archivers/dir.c
changeset 69 546a95cc5591
parent 41 ff60d39d0862
child 93 74d1df359be3
--- a/archivers/dir.c	Thu Aug 23 15:22:52 2001 +0000
+++ b/archivers/dir.c	Thu Aug 23 15:23:21 2001 +0000
@@ -13,7 +13,6 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <fcntl.h>
-#include <unistd.h>
 #include "physfs.h"
 
 #define __PHYSICSFS_INTERNAL__
@@ -31,7 +30,8 @@
 
     errno = 0;
     retval = fread(buffer, objSize, objCount, h);
-    BAIL_IF_MACRO((retval < objCount) && (ferror(h)),strerror(errno),retval);
+    BAIL_IF_MACRO((retval < (signed int) objCount) && (ferror(h)),
+                   strerror(errno),retval);
 
     return(retval);
 } /* DIR_read */
@@ -45,7 +45,7 @@
 
     errno = 0;
     retval = fwrite(buffer, objSize, objCount, h);
-    if ( (retval < objCount) && (ferror(h)) )
+    if ( (retval < (signed int) objCount) && (ferror(h)) )
         __PHYSFS_setError(strerror(errno));
 
     return(retval);
@@ -267,7 +267,7 @@
     BAIL_IF_MACRO(f == NULL, NULL, 0);
 
     errno = 0;
-    retval = (mkdir(f, S_IRWXU) == 0);
+    retval = __PHYSFS_platformMkDir(f);
     if (!retval)
         __PHYSFS_setError(strerror(errno));