Skip to content

Commit df4c35b

Browse files
komhjpakkane
authored andcommitted
templates: Define a macro for pubic APIs on OS/2
1 parent 4cddf9d commit df4c35b

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

mesonbuild/templates/cpptemplates.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
#else
5656
#define {utoken}_PUBLIC __declspec(dllimport)
5757
#endif
58+
#elif defined __OS2__
59+
#ifdef BUILDING_{utoken}
60+
#define {utoken}_PUBLIC __declspec(dllexport)
61+
#else
62+
#define {utoken}_PUBLIC
63+
#endif
5864
#else
5965
#ifdef BUILDING_{utoken}
6066
#define {utoken}_PUBLIC __attribute__ ((visibility ("default")))

mesonbuild/templates/ctemplates.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
#else
1919
#define {utoken}_PUBLIC __declspec(dllimport)
2020
#endif
21+
#elif defined __OS2__
22+
#ifdef BUILDING_{utoken}
23+
#define {utoken}_PUBLIC __declspec(dllexport)
24+
#else
25+
#define {utoken}_PUBLIC
26+
#endif
2127
#else
2228
#ifdef BUILDING_{utoken}
2329
#define {utoken}_PUBLIC __attribute__ ((visibility ("default")))

mesonbuild/templates/objcpptemplates.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
#else
1919
#define {utoken}_PUBLIC __declspec(dllimport)
2020
#endif
21+
#elif defined __OS2__
22+
#ifdef BUILDING_{utoken}
23+
#define {utoken}_PUBLIC __declspec(dllexport)
24+
#else
25+
#define {utoken}_PUBLIC
26+
#endif
2127
#else
2228
#ifdef BUILDING_{utoken}
2329
#define {utoken}_PUBLIC __attribute__ ((visibility ("default")))

mesonbuild/templates/objctemplates.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
#else
1919
#define {utoken}_PUBLIC __declspec(dllimport)
2020
#endif
21+
#elif defined __OS2__
22+
#ifdef BUILDING_{utoken}
23+
#define {utoken}_PUBLIC __declspec(dllexport)
24+
#else
25+
#define {utoken}_PUBLIC
26+
#endif
2127
#else
2228
#ifdef BUILDING_{utoken}
2329
#define {utoken}_PUBLIC __attribute__ ((visibility ("default")))

0 commit comments

Comments
 (0)