Build system corrections for BeOS and Cygwin.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 10 Jul 2002 21:14:33 +0000
changeset 327 76e207c6b4a7
parent 326 6ad1722bbcae
child 328 e0dcb300aed4
Build system corrections for BeOS and Cygwin.
platform/Makefile.am
platform/beos.cpp
platform/unix.c
platform/win32.c
--- a/platform/Makefile.am	Wed Jul 10 08:15:15 2002 +0000
+++ b/platform/Makefile.am	Wed Jul 10 21:14:33 2002 +0000
@@ -4,12 +4,12 @@
 
 if BUILD_BEOS
 libplatform_la_SOURCES =	\
-	unix.c                  \
 	posix.c                 \
     beos.cpp
 else
 libplatform_la_SOURCES =	\
 	unix.c                  \
+	win32.c                 \
 	posix.c
 endif
 
@@ -18,5 +18,6 @@
 	skeleton.c    \
 	macclassic.c  \
 	win32.c       \
+	unix.c        \
     beos.cpp
 
--- a/platform/beos.cpp	Wed Jul 10 08:15:15 2002 +0000
+++ b/platform/beos.cpp	Wed Jul 10 21:14:33 2002 +0000
@@ -35,7 +35,6 @@
 
 const char *__PHYSFS_platformDirSeparator = "/";
 
-/* !!! FIXME: does strerror() work for non-POSIX api calls? */
 #define get_error_str(x) strerror(x)
 
 
--- a/platform/unix.c	Wed Jul 10 08:15:15 2002 +0000
+++ b/platform/unix.c	Wed Jul 10 21:14:33 2002 +0000
@@ -10,11 +10,8 @@
 #  include <config.h>
 #endif
 
-#if (!defined __BEOS__) /* BeOS uses beos.cpp and posix.c ... */
-
-#if (defined WIN32) /* cygwin/mingw32? */
-#include "win32.c"  /* !!! FIXME: holy friggin' hack. */
-#else
+/* BeOS uses beos.cpp and posix.c ... Cygwin and such use win32.c ... */
+#if ((!defined __BEOS__) && (!defined WIN32))
 
 #if ((defined __APPLE__) && (defined __MACH__))
 #  if (!defined __DARWIN__)
--- a/platform/win32.c	Wed Jul 10 08:15:15 2002 +0000
+++ b/platform/win32.c	Wed Jul 10 21:14:33 2002 +0000
@@ -10,6 +10,8 @@
 #  include <config.h>
 #endif
 
+#ifdef WIN32
+
 #include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -1083,5 +1085,7 @@
     return(retval);
 } /* __PHYSFS_platformGetLastModTime */
 
+#endif
+
 /* end of win32.c ... */