Skip to content

Commit e0ffc77

Browse files
committed
MODPLUG_EXPORT support Watcom compiler.
1 parent 8d0b03a commit e0ffc77

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/libmodplug/stdafx.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ inline void ProcessPlugins(int n) { (void)n; }
137137
# else
138138
# define MODPLUG_EXPORT __declspec(dllimport) /* using libmodplug dll for windows */
139139
# endif
140+
#elif defined(__OS2__) && defined(__WATCOMC__)
141+
# if defined(MODPLUG_BUILD) && defined(__SW_BD) /* building libmodplug as a dll for os/2 */
142+
# define MODPLUG_EXPORT __declspec(dllexport)
143+
# else
144+
# define MODPLUG_EXPORT /* using dll or static libmodplug for os/2 */
145+
# endif
140146
#elif defined(MODPLUG_BUILD) && defined(SYM_VISIBILITY)
141147
# define MODPLUG_EXPORT __attribute__((visibility("default")))
142148
#else

src/modplug.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ extern "C" {
1919
# else
2020
# define MODPLUG_EXPORT __declspec(dllimport) /* using libmodplug dll for windows */
2121
# endif
22+
#elif defined(__OS2__) && defined(__WATCOMC__)
23+
# if defined(MODPLUG_BUILD) && defined(__SW_BD) /* building libmodplug as a dll for os/2 */
24+
# define MODPLUG_EXPORT __declspec(dllexport)
25+
# else
26+
# define MODPLUG_EXPORT /* using dll or static libmodplug for os/2 */
27+
# endif
2228
#elif defined(MODPLUG_BUILD) && defined(SYM_VISIBILITY)
2329
# define MODPLUG_EXPORT __attribute__((visibility("default")))
2430
#else
@@ -182,4 +188,4 @@ MODPLUG_EXPORT void ModPlug_UnloadMixerCallback(ModPlugFile* file) ;
182188
} /* extern "C" */
183189
#endif
184190

185-
#endif
191+
#endif /* MODPLUG_H__INCLUDED */

0 commit comments

Comments
 (0)