* 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$
#include <wctype.h>
#include <time.h>
+#ifdef __WINDOWS__
+#include <io.h>
+#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 **);
#endif
#if defined(__WINDOWS__)
#define wxCRT_StrdupW _wcsdup
-#elif !defined(__DARWIN__) && !defined( __VMS )
+#elif defined(HAVE_WCSDUP)
#define wxCRT_StrdupW wcsdup
#endif
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