DEADSOFTWARE

portability: use posix functions only on unix
[flatwaifu.git] / src / save.c
index fe52cc4982c6f3985774ed8da7d7aeb2c76e1381..fda50f90baa7ce53a53d846e2b21fb7c8cda5729 100644 (file)
@@ -33,7 +33,9 @@
 
 #include <stdio.h> // FILE
 #include <string.h>
-#include <sys/stat.h>
+#ifdef UNIX
+#  include <sys/stat.h>
+#endif
 #include "files.h"
 #include "my.h"
 
@@ -538,9 +540,9 @@ static void WP_loadgame (FILE *h) {
 
 static char *getsavfpname (int n, int ro) {
   static char fn[] = "savgame0.dat";
-  fn[7] = n + '0';
-#ifndef WIN32
   static char p[100];
+  fn[7] = n + '0';
+#ifdef UNIX
   char *e = getenv("HOME");
   strncpy(p, e, 60);
   strcat(p, "/.flatwaifu");