X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bdcb213757b966746ffc73bf01ec2e838d867cd3..f77c0fe312a1dedde4a86c9b967d095802c10384:/include/wx/wxcrtbase.h diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index c93692ff68..cf590db7c3 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -2,7 +2,7 @@ * Name: wx/wxcrtbase.h * Purpose: Type-safe ANSI and Unicode builds compatible wrappers for * CRT functions - * Author: Joel Farley, Ove Kåven + * Author: Joel Farley, Ove K�ven * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee * Created: 1998/06/12 * RCS-ID: $Id$ @@ -34,6 +34,9 @@ #include #include +#ifdef __WINDOWS__ +#include +#endif #if defined(HAVE_STRTOK_R) && defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS char *strtok_r(char *, const char *, char **); @@ -167,7 +170,7 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); #endif #if defined(__WINDOWS__) #define wxCRT_StrdupW _wcsdup -#elif !defined(__DARWIN__) && !defined( __VMS ) +#elif defined(HAVE_WCSDUP) #define wxCRT_StrdupW wcsdup #endif @@ -473,14 +476,12 @@ WXDLLIMPEXP_BASE int wxCRT_FputsW(const wchar_t *ch, FILE *stream); WXDLLIMPEXP_BASE int wxCRT_FputcW(wchar_t wc, FILE *stream); #endif -#define wxCRT_TmpnamA tmpnam -#ifdef _ttmpnam - #define wxCRT_TmpnamW _wtmpnam -#endif - -#ifndef wxCRT_TmpnamW -WXDLLIMPEXP_BASE wchar_t *wxCRT_TmpnamW(wchar_t *s); -#endif +/* + NB: tmpnam() is unsafe and thus is not wrapped! + Use other wxWidgets facilities instead: + wxFileName::CreateTempFileName, wxTempFile, or wxTempFileOutputStream +*/ +#define wxTmpnam(x) wxTmpnam_is_insecure_use_wxTempFile_instead #define wxCRT_PerrorA perror #ifdef wxHAVE_TCHAR_SUPPORT