From 3c3b1816d84a43ec45e3a5dcdc5ddf03d6b8c500 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Mon, 29 Sep 2003 09:16:23 +0000 Subject: * include/stdlib.h: Guard non-ISO functions with !__STRICT_ANSI__, throughout. --- winsup/mingw/include/stdlib.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'winsup/mingw/include/stdlib.h') diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h index 23389c2c1..901a10ece 100644 --- a/winsup/mingw/include/stdlib.h +++ b/winsup/mingw/include/stdlib.h @@ -77,6 +77,8 @@ extern "C" { #endif +#if !defined (__STRICT_ANSI__) + /* * This seems like a convenient place to declare these variables, which * give programs using WinMain (or main for that matter) access to main-ish @@ -116,7 +118,7 @@ __MINGW_IMPORT char** __argv_dll; #endif /* __DECLSPEC_SUPPORTED */ #endif /* __MSVCRT */ - +#endif /* __STRICT_ANSI__ */ /* * Also defined in ctype.h. */ @@ -155,6 +157,7 @@ extern int errno; _CRTIMP int* __cdecl __doserrno(void); #define _doserrno (*__doserrno()) +#if !defined (__STRICT_ANSI__) /* * Use environ from the DLL, not as a global. */ @@ -216,7 +219,6 @@ __MINGW_IMPORT char* _sys_errlist[]; /* * OS version and such constants. */ -#ifndef __STRICT_ANSI__ #ifdef __MSVCRT__ /* msvcrtxx.dll */ @@ -324,9 +326,10 @@ __MINGW_IMPORT int _fmode_dll; _CRTIMP double __cdecl atof (const char*); _CRTIMP int __cdecl atoi (const char*); _CRTIMP long __cdecl atol (const char*); +#if !defined (__STRICT_ANSI__) _CRTIMP int __cdecl _wtoi (const wchar_t *); _CRTIMP long __cdecl _wtol (const wchar_t *); - +#endif _CRTIMP double __cdecl strtod (const char*, char**); #if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ __CRT_INLINE float __cdecl strtof (const char *nptr, char **endptr) @@ -398,7 +401,7 @@ typedef struct { long quot, rem; } ldiv_t; _CRTIMP div_t __cdecl div (int, int); _CRTIMP ldiv_t __cdecl ldiv (long, long); -#ifndef __STRICT_ANSI__ +#if !defined (__STRICT_ANSI__) /* * NOTE: Officially the three following functions are obsolete. The Win32 API -- cgit v1.2.3