#ifndef INCcommonh #define INCcommonh #ifdef WIN32 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include // this must be includes first to get valid definition of ERROR #endif /* The gen_type definitions come from GANIL */ #if !defined(__INCvxTypesOldh) #if !defined(__INCstdioh) /* N.B. There is a Windows header - basetsd.h (that #defs _BASETSD_H_) that typdefs (U)INT32 and in some variants (U)INT16 too (& INT8?) The compiler seems happy with re-typedefing them to the same thing) */ #if !defined(_GEN_TYPE_H_) typedef char INT8; typedef short INT16; typedef int INT32; #endif typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned int UINT32; typedef unsigned char UCHAR; typedef unsigned short USHORT; typedef unsigned int UINT; typedef unsigned long ULONG; typedef int BOOL; typedef int STATUS; typedef int ARGINT; #endif #ifndef WIN32 typedef void VOID; /* can cause problems elsewhere if typedef'd here typedef unsigned int u_int; */ #include #else typedef unsigned long u_long; typedef unsigned int u_int; typedef unsigned short u_short; typedef unsigned char u_char; #endif /* These typedefs are now found in their own header file to overcome a clash with * a GANIL common.h header file from the Hermes package. ptr to function returning int ptr to function returning void ptr to function returning double ptr to function returning float */ /* #ifdef __cplusplus typedef int (*FUNCPTR) (...); typedef void (*VOIDFUNCPTR) (...); typedef double (*DBLFUNCPTR) (...); typedef float (*FLTFUNCPTR) (...); #else typedef int (*FUNCPTR) (); typedef void (*VOIDFUNCPTR) (); typedef double (*DBLFUNCPTR) (); typedef float (*FLTFUNCPTR) (); #endif */ #include "funcptr.h" #endif /* These definitions are also in the same header file */ /* storage class specifier definitions */ #ifdef WIN32 #define DLLEXPORT __declspec(dllexport) #define DLLIMPORT __declspec(dllimport) #define IMPORT extern #else #define DLLEXPORT #define DLLIMPORT extern #define IMPORT extern #endif #define FAST register #define LOCAL static #if !defined(EG_OK) #define EG_OK 0 #endif #if !defined(EG_ERROR) #define EG_ERROR (-1) #endif #if !defined(ERS_OK) #define ERS_OK EG_OK #endif #if !defined(ERS_ERROR) #define ERS_ERROR EG_ERROR #endif #if !defined(OK) #define OK 0 #endif #ifdef WIN32 #undef ERROR #endif #if !defined(ERROR) #define ERROR (-1) #endif #ifdef WIN32 #if !defined(WIN32_ERROR) #define WIN32_ERROR 0 #endif #endif #ifndef WIN32 #if !defined(NULL) #define NULL 0 #endif #if !defined(EOF) || (EOF!=(-1)) #define EOF (-1) #endif #if !defined(FALSE) || (FALSE!=0) #define FALSE 0 #endif #if !defined(TRUE) || (TRUE!=1) #define TRUE 1 #endif #endif #if defined (UNIX) || defined (LYNXOS) || defined (LINUX) typedef void * SYM_TYPE; #else typedef signed char SYM_TYPE; /* SYM_TYPE */ #endif #endif