Ver Fonte

Build system corrections for BeOS and Cygwin.

Ryan C. Gordon há 24 anos atrás
pai
commit
99a03b9452
4 ficheiros alterados com 8 adições e 7 exclusões
  1. 2 1
      platform/Makefile.am
  2. 0 1
      platform/beos.cpp
  3. 2 5
      platform/unix.c
  4. 4 0
      platform/win32.c

+ 2 - 1
platform/Makefile.am

@@ -4,12 +4,12 @@ INCLUDES = -I$(top_srcdir)
 
 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 @@ EXTRA_DIST =      \
 	skeleton.c    \
 	macclassic.c  \
 	win32.c       \
+	unix.c        \
     beos.cpp
 

+ 0 - 1
platform/beos.cpp

@@ -35,7 +35,6 @@
 
 const char *__PHYSFS_platformDirSeparator = "/";
 
-/* !!! FIXME: does strerror() work for non-POSIX api calls? */
 #define get_error_str(x) strerror(x)
 
 

+ 2 - 5
platform/unix.c

@@ -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__)

+ 4 - 0
platform/win32.c

@@ -10,6 +10,8 @@
 #  include <config.h>
 #endif
 
+#ifdef WIN32
+
 #include <windows.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -1083,5 +1085,7 @@ PHYSFS_sint64 __PHYSFS_platformGetLastModTime(const char *fname)
     return(retval);
 } /* __PHYSFS_platformGetLastModTime */
 
+#endif
+
 /* end of win32.c ... */