Przeglądaj źródła

Some cleanups for PocketPC port.

Ryan C. Gordon 23 lat temu
rodzic
commit
9d82110b57
13 zmienionych plików z 9 dodań i 20 usunięć
  1. 0 2
      archivers/dir.c
  2. 0 3
      archivers/grp.c
  3. 0 3
      archivers/qpak.c
  4. 1 3
      archivers/zip.c
  5. 1 1
      configure.in
  6. 1 1
      makeos2.cmd
  7. 0 2
      physfs.c
  8. 0 1
      physfs_byteorder.c
  9. 6 0
      physfs_internal.h
  10. 0 1
      platform/beos.cpp
  11. 0 1
      platform/os2.c
  12. 0 1
      platform/posix.c
  13. 0 1
      platform/win32.c

+ 0 - 2
archivers/dir.c

@@ -13,8 +13,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <fcntl.h>
 #include "physfs.h"
 
 #define __PHYSICSFS_INTERNAL__

+ 0 - 3
archivers/grp.c

@@ -33,9 +33,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <assert.h>
 #include "physfs.h"
 
 #define __PHYSICSFS_INTERNAL__

+ 0 - 3
archivers/qpak.c

@@ -16,9 +16,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <assert.h>
 #include "physfs.h"
 
 #define __PHYSICSFS_INTERNAL__

+ 1 - 3
archivers/zip.c

@@ -16,10 +16,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <assert.h>
-#include <time.h>
 #include <errno.h>
-
+#include <time.h>
 #include "physfs.h"
 #include "zlib.h"
 

+ 1 - 1
configure.in

@@ -436,7 +436,7 @@ fi
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([stdlib.h string.h])
+AC_CHECK_HEADERS([stdlib.h string.h assert.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 dnl AC_C_CONST

+ 1 - 1
makeos2.cmd

@@ -7,7 +7,7 @@ rem  Patches go to icculus@clutteredmind.org ...
 
 set PHYSFSLANG=PHYSFS_LANG_ENGLISH
 set DEBUGFLAGS=-D_NDEBUG -O2 -s
-set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib114 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_LANG=%PHYSFSLANG%
+set CFLAGS=%DEBUGFLAGS% -Wall -Werror -Zomf -Zmt -Zmtd -I. -Izlib114 -c -D__ST_MT_ERRNO__ -DOS2 -DPHYSFS_SUPPORTS_ZIP -DPHYSFS_SUPPORTS_GRP -DPHYSFS_SUPPORTS_QPAK -DPHYSFS_LANG=%PHYSFSLANG% -DHAVE_ASSERT_H=1
 
 @echo on
 mkdir bin

+ 0 - 2
physfs.c

@@ -20,8 +20,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <fcntl.h>
-#include <errno.h>
 #include "physfs.h"
 
 #define __PHYSICSFS_INTERNAL__

+ 0 - 1
physfs_byteorder.c

@@ -14,7 +14,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 
 #define __PHYSICSFS_INTERNAL__
 #include "physfs_internal.h"

+ 6 - 0
physfs_internal.h

@@ -16,6 +16,12 @@
 
 #include "physfs.h"
 
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#else
+#define assert(x)
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif

+ 0 - 1
platform/beos.cpp

@@ -26,7 +26,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <assert.h>
 #include <unistd.h>
 
 #define __PHYSICSFS_INTERNAL__

+ 0 - 1
platform/os2.c

@@ -26,7 +26,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <assert.h>
 #include <time.h>
 #include <ctype.h>
 

+ 0 - 1
platform/posix.c

@@ -43,7 +43,6 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <assert.h>
 
 #ifdef PHYSFS_HAVE_LLSEEK
 #include <linux/unistd.h>

+ 0 - 1
platform/win32.c

@@ -19,7 +19,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <time.h>
-#include <assert.h>
 
 #define __PHYSICSFS_INTERNAL__
 #include "physfs_internal.h"