00001
00002
00003
00004
00005
00006
00007 #ifndef skGENERAL_H
00008 #define skGENERAL_H
00009
00010
00011
00012 #ifndef _WIN32_WCE
00013 #define STREAMS_ENABLED
00014 #define EXCEPTIONS_DEFINED
00015 #include <assert.h>
00016 #else
00017 #define assert(exp) ((void)0)
00018 #define UNICODE_STRINGS
00019 #endif
00020
00021 #include <stdlib.h>
00022
00023 typedef unsigned int USize;
00024
00025 #ifndef max
00026 #define max(a,b) (((a)>(b))?(a):(b))
00027 #endif
00028 #ifndef min
00029 #define min(a,b) (((a)<(b))?(a):(b))
00030 #endif
00031
00032
00033
00034
00035
00036
00037
00038 #ifdef ENABLE_WINDOWS_THREAD_SUPPORT
00039 #if defined(_MSC_VER) && (_MSC_VER >= 1200 )
00040 #define THREAD __declspec(thread)
00041 #else
00042 #define THREAD
00043 #endif
00044 #else
00045 #define THREAD
00046 #endif
00047
00048
00049
00050
00051 #ifdef ENABLE_WINDOWS_DLL_SUPPORT
00052 #if defined(_MSC_VER)
00053 #define LIBIMPORT __declspec( dllimport )
00054 #define LIBEXPORT __declspec( dllexport )
00055 #endif
00056 #if defined(BUILDING_DLL)
00057 #define CLASSEXPORT LIBEXPORT
00058 #define EXTERN_TEMPLATE
00059 #else
00060 #define CLASSEXPORT LIBIMPORT
00061 #define EXTERN_TEMPLATE extern
00062 #endif
00063 #else
00064
00065 #define LIBIMPORT
00066 #define LIBEXPORT
00067 #define CLASSEXPORT
00068 #define EXTERN_TEMPLATE
00069 #endif
00070
00071
00072 #ifdef EXCEPTIONS_DEFINED
00073 # ifdef __AFX_H__ // this is intended to resolve clashes with MFC's THROW()
00074 # undef THROW
00075 # endif
00076 #define THROW(x,c) throw x;
00077 #else
00078 #include <windows.h>
00079 #define THROW(x,c) RaiseException(c,0,0,0)
00080 #endif
00081
00082 #endif