Try to make a sane default for CD detection path by platform.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 19 Mar 2012 20:42:41 -0400
changeset 1236 ad779490c5b6
parent 1235 2ed0567fe413
child 1237 6d8b32355a28
Try to make a sane default for CD detection path by platform. This is so this can work even when dropping PhysicsFS into another project without CMake doing header tests and filling in the defines.
src/platform_unix.c
--- a/src/platform_unix.c	Mon Mar 19 20:41:14 2012 -0400
+++ b/src/platform_unix.c	Mon Mar 19 20:42:41 2012 -0400
@@ -21,6 +21,14 @@
 #include <time.h>
 #include <errno.h>
 
+#if PHYSFS_PLATFORM_LINUX && !defined(PHYSFS_HAVE_MNTENT_H)
+#define PHYSFS_HAVE_MNTENT_H 1
+#elif PHYSFS_PLATFORM_SOLARIS && !defined(PHYSFS_HAVE_SYS_MNTTAB_H)
+#define PHYSFS_HAVE_SYS_MNTTAB_H 1
+#elif PHYSFS_PLATFORM_BSD && !defined(PHYSFS_HAVE_SYS_UCRED_H)
+#define PHYSFS_HAVE_SYS_UCRED_H 1
+#endif
+
 #ifdef PHYSFS_HAVE_SYS_UCRED_H
 #  ifdef PHYSFS_HAVE_MNTENT_H
 #    undef PHYSFS_HAVE_MNTENT_H /* don't do both... */