I notice that it is missing the needed defines before include os2.h, eg for the screensaver module, it should be something like,
#define INCL_DOS
#define INCL_WIN
#define INCL_GPI
#define INCL_ERRORS
#define INCL_TYPES
#include <os2.h>
The defines are so os2.h actually includes various things. Still for an AI, it isn't too bad at searching Google.