summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/defines.h b/defines.h
index 334be52..0aee7d8 100644
--- a/defines.h
+++ b/defines.h
@@ -124,17 +124,19 @@ void xfree _((void*));
#include "vms/vms.h"
#endif
-#if defined __CYGWIN__
-# undef EXTERN
-# if defined USEIMPORTLIB
-# define EXTERN extern __declspec(dllimport)
-# else
-# define EXTERN extern __declspec(dllexport)
+#undef RUBY_EXTERN
+#if defined __CYGWIN__ || defined _WIN32
+# ifndef RUBY_EXPORT
+# define RUBY_EXTERN extern __declspec(dllimport)
# endif
#endif
+#ifndef RUBY_EXTERN
+#define RUBY_EXTERN extern
+#endif
+
#ifndef EXTERN
-#define EXTERN extern
+#define EXTERN RUBY_EXTERN /* deprecated */
#endif
#if defined(sparc) || defined(__sparc__)