Go to the documentation of this file.
20 #ifndef TESSERACT_CCUTIL_PLATFORM_H__
21 #define TESSERACT_CCUTIL_PLATFORM_H__
32 #define snprintf _snprintf
33 #if (_MSC_VER <= 1400)
34 #define vsnprintf _vsnprintf
43 #define MAX_PATH PATH_MAX
50 #define M_PI 3.14159265358979323846
54 #if defined(_WIN32) || defined(__CYGWIN__)
55 #if defined(TESS_EXPORTS)
56 #define TESS_API __declspec(dllexport)
57 #elif defined(TESS_IMPORTS)
58 #define TESS_API __declspec(dllimport)
65 #if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
66 #define TESS_API __attribute__ ((visibility ("default")))
67 #define TESS_LOCAL __attribute__ ((visibility ("hidden")))
78 #if defined(_WIN32) || defined(__CYGWIN__)
79 #define _TESS_FILE_BASENAME_ \
80 (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
82 #define _TESS_FILE_BASENAME_ \
83 (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
86 #endif // TESSERACT_CCUTIL_PLATFORM_H__