replace non-thread-safe functions

replace all uses of strtok, localtime, gmtime and readdir

on platforms without safe versions, use homebrew or unsafe...
This commit is contained in:
ac-stef
2016-02-28 23:14:47 +01:00
parent 98d01d1f34
commit 32ffd3a4cd
11 changed files with 60 additions and 38 deletions
+3 -3
View File
@@ -1423,8 +1423,8 @@ const char *parseDemoFilename(char *srvfinfo)
{
int fip = 0;
char sep[] = ":";
char *pch;
pch = strtok (srvfinfo,sep);
char *pch, *b;
pch = strtok_r(srvfinfo, sep, &b);
while (pch != NULL && fip < 4)
{
fip++;
@@ -1436,7 +1436,7 @@ const char *parseDemoFilename(char *srvfinfo)
case 4: stamp = atoi(pch); break;
default: break;
}
pch = strtok (NULL, sep);
pch = strtok_r(NULL, sep, &b);
}
copystring(srvmap, pch);
}