tesseract  5.0.0-alpha-619-ge9db
platform.h
Go to the documentation of this file.
1 // File: platform.h
3 // Description: Place holder
4 //
5 // (C) Copyright 2006, Google Inc.
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
17 
18 #ifndef TESSERACT_CCUTIL_PLATFORM_H_
19 #define TESSERACT_CCUTIL_PLATFORM_H_
20 
21 #define DLLSYM
22 #ifndef _WIN32
23 # ifdef __cplusplus
24 # include <climits>
25 # else /* C compiler*/
26 # include <limits.h>
27 # endif /* __cplusplus */
28 # ifndef PATH_MAX
29 # define MAX_PATH 4096
30 # else
31 # define MAX_PATH PATH_MAX
32 # endif
33 #endif
34 
35 #if defined(_WIN32) || defined(__CYGWIN__)
36 # if defined(TESS_EXPORTS)
37 # define TESS_API __declspec(dllexport)
38 # elif defined(TESS_IMPORTS)
39 # define TESS_API __declspec(dllimport)
40 # else
41 # define TESS_API
42 # endif
43 # define TESS_LOCAL
44 #else
45 # if __GNUC__ >= 4
46 # if defined(TESS_EXPORTS) || defined(TESS_IMPORTS)
47 # define TESS_API __attribute__((visibility("default")))
48 # define TESS_LOCAL __attribute__((visibility("hidden")))
49 # else
50 # define TESS_API
51 # define TESS_LOCAL
52 # endif
53 # else
54 # define TESS_API
55 # define TESS_LOCAL
56 # endif
57 #endif
58 
59 #endif // TESSERACT_CCUTIL_PLATFORM_H_