File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 117
117
118
118
6 . Alternative to steps 4. and 5. -
119
119
120
- powershell -ExecutionPolicy ByPass -File build.ps1 -toolset 141
120
+ powershell -ExecutionPolicy ByPass -File build.ps1 -toolset 142
121
121
122
122
The build script builds executables and installation media for all
123
123
platforms (x86 and x64 / Debug and Release with debug symbols)
Original file line number Diff line number Diff line change @@ -362,15 +362,19 @@ string File::tempFileName()
362
362
#ifdef _WIN32
363
363
// requires TMP environment variable to be set
364
364
wchar_t *fileName = _wtempnam (nullptr , nullptr ); // TODO: static buffer, not thread-safe
365
- if ( !fileName )
365
+ if ( !fileName)
366
366
THROW (" Failed to create a temporary file name." );
367
+ string path = decodeName (fileName);
368
+ free (fileName);
369
+ #else
370
+ #ifdef __APPLE__
371
+ string path = env (" TMPDIR" ) + " /XXXXXX" ;
367
372
#else
368
- char *fileName = strdup (" /tmp/XXXXXX" );
369
- if (mkstemp (fileName) == -1 )
373
+ string path = " /tmp/XXXXXX" ;
374
+ #endif
375
+ if (mkstemp (path.data ()) == -1 )
370
376
THROW (" Failed to create a temporary file name." );
371
377
#endif
372
- string path = decodeName (fileName);
373
- free (fileName);
374
378
tempFiles.push (path);
375
379
return path;
376
380
}
You can’t perform that action at this time.
0 commit comments