summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/include/_mingw.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/include/_mingw.h')
-rw-r--r--winsup/mingw/include/_mingw.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h
index 0ee41f3fe..33b808d2a 100644
--- a/winsup/mingw/include/_mingw.h
+++ b/winsup/mingw/include/_mingw.h
@@ -44,13 +44,18 @@
style declarations. */
#ifndef __GNUC__
-# define __MINGW_IMPORT __declspec(dllimport)
+# ifndef __MINGW_IMPORT
+# define __MINGW_IMPORT __declspec(dllimport)
+# endif
# define __DECLSPEC_SUPPORTED
#else /* __GNUC__ */
# ifdef __declspec
+# ifndef __MINGW_IMPORT
+
/* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */
-# define __MINGW_IMPORT extern __attribute__((dllimport))
+# define __MINGW_IMPORT extern __attribute__((dllimport))
+# endif
# define __DECLSPEC_SUPPORTED
# else
# undef __DECLSPEC_SUPPORTED