Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00019
00020 #ifndef TESSERACT_CCUTIL_PLATFORM_H__
00021 #define TESSERACT_CCUTIL_PLATFORM_H__
00022
00023 #define DLLSYM
00024 #ifdef _WIN32
00025 #ifdef __GNUC__
00026 #define ultoa _ultoa
00027 typedef struct _BLOB {
00028 unsigned int cbSize;
00029 char *pBlobData;
00030 } BLOB, *LPBLOB;
00031 #endif
00032 #define SIGNED
00033 #define snprintf _snprintf
00034 #if (_MSC_VER <= 1400)
00035 #define vsnprintf _vsnprintf
00036 #endif
00037 #else
00038 #define __UNIX__
00039 #include <limits.h>
00040 #ifndef PATH_MAX
00041 #define MAX_PATH 4096
00042 #else
00043 #define MAX_PATH PATH_MAX
00044 #endif
00045 #define SIGNED signed
00046 #endif
00047
00048 #if defined(_WIN32) || defined(__CYGWIN__)
00049 #if defined(TESS_EXPORTS)
00050 #define TESS_API __declspec(dllexport)
00051 #elif defined(TESS_IMPORTS)
00052 #define TESS_API __declspec(dllimport)
00053 #else
00054 #define TESS_API
00055 #endif
00056 #define TESS_LOCAL
00057 #else
00058 #if __GNUC__ >= 4
00059 #if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
00060 #define TESS_API __attribute__ ((visibility ("default")))
00061 #define TESS_LOCAL __attribute__ ((visibility ("hidden")))
00062 #else
00063 #define TESS_API
00064 #define TESS_LOCAL
00065 #endif
00066 #else
00067 #define TESS_API
00068 #define TESS_LOCAL
00069 #endif
00070 #endif
00071
00072 #endif // TESSERACT_CCUTIL_PLATFORM_H__