Daniel Lehman : msvcrt: Sync _wtempnam with _tempnam.

Alexandre Julliard julliard at winehq.org
Mon Jan 9 14:24:30 CST 2012


Module: wine
Branch: master
Commit: 85559848ff32840eaf7d69e019ee0cc7a1ca910c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=85559848ff32840eaf7d69e019ee0cc7a1ca910c

Author: Daniel Lehman <dlehman at esri.com>
Date:   Fri Jan  6 12:24:06 2012 -0800

msvcrt: Sync _wtempnam with _tempnam.

---

 dlls/msvcrt/file.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index c4ba546..cde8a81 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -2371,7 +2371,11 @@ char * CDECL MSVCRT__tempnam(const char *dir, const char *prefix)
  */
 MSVCRT_wchar_t * CDECL MSVCRT__wtempnam(const MSVCRT_wchar_t *dir, const MSVCRT_wchar_t *prefix)
 {
+  static const MSVCRT_wchar_t tmpW[] = {'T','M','P',0};
   MSVCRT_wchar_t tmpbuf[MAX_PATH];
+  const MSVCRT_wchar_t *tmp_dir = MSVCRT__wgetenv(tmpW);
+
+  if (tmp_dir) dir = tmp_dir;
 
   TRACE("dir (%s) prefix (%s)\n",debugstr_w(dir),debugstr_w(prefix));
   if (GetTempFileNameW(dir,prefix,0,tmpbuf))




More information about the wine-cvs mailing list