Backed out changeset db90809844d2 (bug 1884769) for causing detekt linter failures...
[gecko.git] / gfx / ots / ots-visibility.patch
blobe9332de7d787f83d8c15f0221b1a5f43f5dec047
1 diff --git a/include/opentype-sanitiser.h b/include/opentype-sanitiser.h
2 --- a/include/opentype-sanitiser.h
3 +++ b/include/opentype-sanitiser.h
4 @@ -4,8 +4,28 @@
6 #ifndef OPENTYPE_SANITISER_H_
7 #define OPENTYPE_SANITISER_H_
9 +#if defined(_WIN32) || defined(__CYGWIN__)
10 + #define OTS_DLL_IMPORT __declspec(dllimport)
11 + #define OTS_DLL_EXPORT __declspec(dllexport)
12 +#else
13 + #if __GNUC__ >= 4
14 + #define OTS_DLL_IMPORT __attribute__((visibility ("default")))
15 + #define OTS_DLL_EXPORT __attribute__((visibility ("default")))
16 + #endif
17 +#endif
19 +#ifdef OTS_DLL
20 + #ifdef OTS_DLL_EXPORTS
21 + #define OTS_API OTS_DLL_EXPORT
22 + #else
23 + #define OTS_API OTS_DLL_IMPORT
24 + #endif
25 +#else
26 + #define OTS_API
27 +#endif
29 #if defined(_WIN32)
30 #include <stdlib.h>
31 typedef signed char int8_t;
32 typedef unsigned char uint8_t;
33 @@ -164,9 +184,9 @@ enum TableAction {
34 TABLE_ACTION_PASSTHRU, // Serialize the table unchanged
35 TABLE_ACTION_DROP // Drop the table
38 -class OTSContext {
39 +class OTS_API OTSContext {
40 public:
41 OTSContext() {}
42 virtual ~OTSContext() {}