Changeset 3462 for trunk/emx/src/emxomf/emxomfld.c
- Timestamp:
- Jun 17, 2007, 2:11:18 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/emx/src/emxomf/emxomfld.c
r3417 r3462 634 634 char szLooklike[32]; 635 635 pid_t pid = getpid(); 636 const char * pszTmp = getenv("TMP"); 637 if (!pszTmp) pszTmp = getenv("TMPDIR"); 638 if (!pszTmp) pszTmp = getenv("TEMP"); 639 if (!pszTmp) pszTmp = "."; 636 static char s_szTmp[_MAX_PATH + 1]; 637 638 /* We need to apply _realrealpath to the tmpdir, so resolve that once and for all. */ 639 if (!s_szTmp[0]) 640 { 641 const char * pszTmp = getenv("TMP"); 642 if (!pszTmp) pszTmp = getenv("TMPDIR"); 643 if (!pszTmp) pszTmp = getenv("TEMP"); 644 if (!pszTmp) pszTmp = "."; 645 if (!_realrealpath(pszTmp, s_szTmp, sizeof(s_szTmp))) 646 { 647 printf("emxomfld: _realrealpath failed on '%s'!!!\n", pszTmp); 648 exit(1); 649 } 650 } 651 640 652 if (pszLooklike) 641 653 { … … 664 676 return -1; 665 677 gettimeofday(&tv, NULL); 666 sprintf(pszFile, "%s\\%s%s%x%lx%d%lx%s", pszTmp, pszPrefix, pszLooklike, pid, tv.tv_sec, c, tv.tv_usec, pszSuffix);678 sprintf(pszFile, "%s\\%s%s%x%lx%d%lx%s", s_szTmp, pszPrefix, pszLooklike, pid, tv.tv_sec, c, tv.tv_usec, pszSuffix); 667 679 } while (!stat(pszFile, &s)); 668 680
Note:
See TracChangeset
for help on using the changeset viewer.