From: DeaDDooMER Date: Sun, 31 Jan 2021 13:50:14 +0000 (+0300) Subject: portability: use posix functions only on unix X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=06c726c585fe8bb4a7b61d9d7b100f4da371a4e6;p=flatwaifu.git portability: use posix functions only on unix --- diff --git a/src/files.c b/src/files.c index d78389f..a659f26 100644 --- a/src/files.c +++ b/src/files.c @@ -19,7 +19,9 @@ #include #include #include -#include +#ifdef UNIX +# include +#endif #include "files.h" #include "map.h" #include "my.h" diff --git a/src/save.c b/src/save.c index 2753421..fda50f9 100644 --- a/src/save.c +++ b/src/save.c @@ -33,7 +33,9 @@ #include // FILE #include -#include +#ifdef UNIX +# include +#endif #include "files.h" #include "my.h" @@ -540,7 +542,7 @@ static char *getsavfpname (int n, int ro) { static char fn[] = "savgame0.dat"; static char p[100]; fn[7] = n + '0'; -#ifndef WIN32 +#ifdef UNIX char *e = getenv("HOME"); strncpy(p, e, 60); strcat(p, "/.flatwaifu");