diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2003-01-03 05:02:18 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2003-01-03 05:02:18 +0000 |
commit | 7b061fd844f6ade0087cfde28eea223b2aa778a2 (patch) | |
tree | 13ecb319e38fad32a82735f091d39486330d6bfb /winsup/mingw | |
parent | c467d1396f3b7825c8925f1898f539ad491491b0 (diff) | |
download | newlib-7b061fd844f6ade0087cfde28eea223b2aa778a2.zip newlib-7b061fd844f6ade0087cfde28eea223b2aa778a2.tar.gz newlib-7b061fd844f6ade0087cfde28eea223b2aa778a2.tar.bz2 |
* include/stdlib.h (_osver, _winver, _winmajor,
_winminor): Declare as direct imports from dll if
__DECLSPEC_SUPPORTED.
Diffstat (limited to 'winsup/mingw')
-rw-r--r-- | winsup/mingw/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/mingw/include/stdlib.h | 15 |
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 */ |