Go to the documentation of this file.
20 #ifndef TESSERACT_CCUTIL_PLATFORM_H__
21 #define TESSERACT_CCUTIL_PLATFORM_H__
33 #define snprintf _snprintf
35 #if (_MSC_VER <= 1400)
36 #define vsnprintf _vsnprintf
45 #define MAX_PATH PATH_MAX
50 #if defined(_WIN32) || defined(__CYGWIN__)
52 #define M_PI 3.14159265358979323846
56 #if defined(_WIN32) || defined(__CYGWIN__)
57 #if defined(TESS_EXPORTS)
58 #define TESS_API __declspec(dllexport)
59 #elif defined(TESS_IMPORTS)
60 #define TESS_API __declspec(dllimport)
67 #if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
68 #define TESS_API __attribute__ ((visibility ("default")))
69 #define TESS_LOCAL __attribute__ ((visibility ("hidden")))
80 #if defined(_WIN32) || defined(__CYGWIN__)
81 #define _TESS_FILE_BASENAME_ \
82 (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
84 #define _TESS_FILE_BASENAME_ \
85 (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
88 #endif // TESSERACT_CCUTIL_PLATFORM_H__