From f2a958069937974bdbe264e6e441b234b8eb866c Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Thu, 12 Jul 2007 09:38:17 +0000 Subject: [PATCH] * incude/wchar.h (_wsystem) Declare. (_wputenv) Declare. (_wgetenv): Declare. (_wsearchenv): Declare. (_wmakepath): Declare. (_wsplitpath): Declare. (_wfullpath): Declare. * incude/stdlib.h (_wsystem) Declare. (_wputenv, _wgetenv, _wsearchenv, _wmakepath, _wsplitpath, _wfullpath): Move into _WSTDLIB_DEFINED guard. * include/tchar.h (_tsystem): New UNICODE mapping define. --- winsup/mingw/ChangeLog | 14 ++++++++++++++ winsup/mingw/include/stdlib.h | 20 +++++++++++--------- winsup/mingw/include/tchar.h | 2 ++ winsup/mingw/include/wchar.h | 16 ++++++++++++---- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 264940f6a..a5b6dc8f9 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,17 @@ +2007-07-12 Danny Smith + + * incude/wchar.h (_wsystem) Declare. + (_wputenv) Declare. + (_wgetenv): Declare. + (_wsearchenv): Declare. + (_wmakepath): Declare. + (_wsplitpath): Declare. + (_wfullpath): Declare. + * incude/stdlib.h (_wsystem) Declare. + (_wputenv, _wgetenv, _wsearchenv, _wmakepath, _wsplitpath, + _wfullpath): Move into _WSTDLIB_DEFINED guard. + * include/tchar.h (_tsystem): New UNICODE mapping define. + 2007-06-29 Danny Smith * mingwex/gdtoa/mingw_snprintf.c: New file. diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h index f8be3c1b1..ac82edecf 100644 --- a/winsup/mingw/include/stdlib.h +++ b/winsup/mingw/include/stdlib.h @@ -318,14 +318,22 @@ _CRTIMP unsigned long __cdecl __MINGW_NOTHROW strtoul (const char*, char**, int) #ifndef _WSTDLIB_DEFINED /* also declared in wchar.h */ +_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); _CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); #if !defined __NO_ISOCEXT /* in libmingwex.a */ float __cdecl __MINGW_NOTHROW wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__); long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); #endif /* __NO_ISOCEXT */ - -_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); -_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); +#ifdef __MSVCRT__ +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t); +#endif #define _WSTDLIB_DEFINED #endif @@ -420,12 +428,6 @@ _CRTIMP __int64 __cdecl __MINGW_NOTHROW _wtoi64(const wchar_t *); _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _i64tow(__int64, wchar_t *, int); _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ui64tow(unsigned __int64, wchar_t *, int); -_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*); -_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*); -_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); -_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); -_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); -_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t); _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotl(unsigned int, int) __MINGW_ATTRIB_CONST; _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotr(unsigned int, int) __MINGW_ATTRIB_CONST; diff --git a/winsup/mingw/include/tchar.h b/winsup/mingw/include/tchar.h index a07d75f45..f68056263 100644 --- a/winsup/mingw/include/tchar.h +++ b/winsup/mingw/include/tchar.h @@ -188,6 +188,7 @@ typedef wchar_t _TCHAR; #define _tgetenv _wgetenv #define _tputenv _wputenv #define _tsearchenv _wsearchenv +#define _tsystem _wsystem #define _tmakepath _wmakepath #define _tsplitpath _wsplitpath #define _tfullpath _wfullpath @@ -282,6 +283,7 @@ typedef char _TCHAR; #define _tgetenv getenv #define _tputenv _putenv #define _tsearchenv _searchenv +#define _tsystem system #define _tmakepath _makepath #define _tsplitpath _splitpath #define _tfullpath _fullpath diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h index f28b7b67f..2e86c766e 100644 --- a/winsup/mingw/include/wchar.h +++ b/winsup/mingw/include/wchar.h @@ -152,15 +152,23 @@ int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__, #define _WSTDIO_DEFINED #endif /* _WSTDIO_DEFINED */ - #ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */ -_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); -_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); -_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); +_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int); +_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int); +_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**); #if !defined __NO_ISOCEXT /* in libmingwex.a */ float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__); long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__); #endif /* __NO_ISOCEXT */ +#ifdef __MSVCRT__ +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*); +_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*); +_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*); +_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t); +#endif #define _WSTDLIB_DEFINED #endif /* _WSTDLIB_DEFINED */