Some cleanups for PocketPC port.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 22 Nov 2002 06:24:10 +0000
changeset 504 3420d82f9b01
parent 503 f5708319a9f6
child 505 c7f7f234a156
Some cleanups for PocketPC port.
archivers/dir.c
archivers/grp.c
archivers/qpak.c
archivers/zip.c
configure.in
makeos2.cmd
physfs.c
physfs_byteorder.c
physfs_internal.h
platform/beos.cpp
platform/os2.c
platform/posix.c
platform/win32.c
--- a/archivers/dir.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/archivers/dir.c	Fri Nov 22 06:24:10 2002 +0000
@@ -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__
--- a/archivers/grp.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/archivers/grp.c	Fri Nov 22 06:24:10 2002 +0000
@@ -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__
--- a/archivers/qpak.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/archivers/qpak.c	Fri Nov 22 06:24:10 2002 +0000
@@ -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__
--- a/archivers/zip.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/archivers/zip.c	Fri Nov 22 06:24:10 2002 +0000
@@ -16,10 +16,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <assert.h>
+#include <errno.h>
 #include <time.h>
-#include <errno.h>
-
 #include "physfs.h"
 #include "zlib.h"
 
--- a/configure.in	Fri Nov 22 06:23:52 2002 +0000
+++ b/configure.in	Fri Nov 22 06:24:10 2002 +0000
@@ -436,7 +436,7 @@
 
 # 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
--- a/makeos2.cmd	Fri Nov 22 06:23:52 2002 +0000
+++ b/makeos2.cmd	Fri Nov 22 06:24:10 2002 +0000
@@ -7,7 +7,7 @@
 
 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
--- a/physfs.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/physfs.c	Fri Nov 22 06:24:10 2002 +0000
@@ -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__
--- a/physfs_byteorder.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/physfs_byteorder.c	Fri Nov 22 06:24:10 2002 +0000
@@ -14,7 +14,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <assert.h>
 
 #define __PHYSICSFS_INTERNAL__
 #include "physfs_internal.h"
--- a/physfs_internal.h	Fri Nov 22 06:23:52 2002 +0000
+++ b/physfs_internal.h	Fri Nov 22 06:24:10 2002 +0000
@@ -16,6 +16,12 @@
 
 #include "physfs.h"
 
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#else
+#define assert(x)
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
--- a/platform/beos.cpp	Fri Nov 22 06:23:52 2002 +0000
+++ b/platform/beos.cpp	Fri Nov 22 06:24:10 2002 +0000
@@ -26,7 +26,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#include <assert.h>
 #include <unistd.h>
 
 #define __PHYSICSFS_INTERNAL__
--- a/platform/os2.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/platform/os2.c	Fri Nov 22 06:24:10 2002 +0000
@@ -26,7 +26,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <assert.h>
 #include <time.h>
 #include <ctype.h>
 
--- a/platform/posix.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/platform/posix.c	Fri Nov 22 06:24:10 2002 +0000
@@ -43,7 +43,6 @@
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <assert.h>
 
 #ifdef PHYSFS_HAVE_LLSEEK
 #include <linux/unistd.h>
--- a/platform/win32.c	Fri Nov 22 06:23:52 2002 +0000
+++ b/platform/win32.c	Fri Nov 22 06:24:10 2002 +0000
@@ -19,7 +19,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <time.h>
-#include <assert.h>
 
 #define __PHYSICSFS_INTERNAL__
 #include "physfs_internal.h"