aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/mingw/ChangeLog6
-rw-r--r--winsup/mingw/include/stdlib.h15
2 files changed, 17 insertions, 4 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index d88f6b2..269dbe9 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2003-01-03 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/stdlib.h (_osver, _winver, _winmajor,
+ _winminor): Declare as direct imports from dll if
+ __DECLSPEC_SUPPORTED.
+
2003-01-01 Danny Smith <dannysmith@users.sourceforge.net>
* pseudo-reloc.c (do_pseudo_reloc): Make static.
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
index 349249e..c4a101b 100644
--- a/winsup/mingw/include/stdlib.h
+++ b/winsup/mingw/include/stdlib.h
@@ -226,10 +226,17 @@ extern unsigned int* __p__winver(void);
extern unsigned int* __p__winmajor(void);
extern unsigned int* __p__winminor(void);
-#define _osver (*__p__osver())
-#define _winver (*__p__winver())
-#define _winmajor (*__p__winmajor())
-#define _winminor (*__p__winminor())
+#ifndef __DECLSPEC_SUPPORTED
+# define _osver (*__p__osver())
+# define _winver (*__p__winver())
+# define _winmajor (*__p__winmajor())
+# define _winminor (*__p__winminor())
+#else
+__MINGW_IMPORT unsigned int _osver;
+__MINGW_IMPORT unsigned int _winver;
+__MINGW_IMPORT unsigned int _winmajor;
+__MINGW_IMPORT unsigned int _winminor;
+#endif __DECLSPEC_SUPPORTED
#else
/* Not msvcrtxx.dll, thus crtdll.dll */