- made tmpfileplus a .cpp file so that it can access ZDoom's own utility code.

This commit is contained in:
Christoph Oelckers 2017-12-02 16:51:53 +01:00
parent 8627a48b34
commit 4ca3acb0e3
2 changed files with 2 additions and 2 deletions

View file

@ -1169,6 +1169,7 @@ set (PCH_SOURCES
events.cpp events.cpp
GuillotineBinPack.cpp GuillotineBinPack.cpp
SkylineBinPack.cpp SkylineBinPack.cpp
tmpfileplus.cpp
) )
enable_precompiled_headers( g_pch.h PCH_SOURCES ) enable_precompiled_headers( g_pch.h PCH_SOURCES )
@ -1183,7 +1184,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
${PCH_SOURCES} ${PCH_SOURCES}
x86.cpp x86.cpp
strnatcmp.c strnatcmp.c
tmpfileplus.c
zstring.cpp zstring.cpp
math/asin.c math/asin.c
math/atan.c math/atan.c

View file

@ -217,7 +217,7 @@ static FILE *mktempfile_internal(const char *tmpdir, const char *pfx, char **tmp
lentempname = strlen(tmpdir) + strlen(FILE_SEPARATOR) + strlen(pfx) + strlen(randpart); lentempname = strlen(tmpdir) + strlen(FILE_SEPARATOR) + strlen(pfx) + strlen(randpart);
DPRINTF1("lentempname=%d\n", lentempname); DPRINTF1("lentempname=%d\n", lentempname);
tmpname = malloc(lentempname + 1); tmpname = (char*)malloc(lentempname + 1);
if (!tmpname) if (!tmpname)
{ {
errno = ENOMEM; errno = ENOMEM;