Get rid of __inline__, just make sure "inline" is defined sanely instead.
--- a/src/physfs_byteorder.c Sat Aug 21 14:05:39 2010 -0400
+++ b/src/physfs_byteorder.c Sat Aug 21 14:29:40 2010 -0400
@@ -14,29 +14,21 @@
#define __PHYSICSFS_INTERNAL__
#include "physfs_internal.h"
-#if (defined macintosh) && !(defined __MWERKS__)
-#define __inline__
-#endif
-
-#if (defined _MSC_VER)
-#define __inline__ __inline
-#endif
-
#ifndef PHYSFS_Swap16
-static __inline__ PHYSFS_uint16 PHYSFS_Swap16(PHYSFS_uint16 D)
+static inline PHYSFS_uint16 PHYSFS_Swap16(PHYSFS_uint16 D)
{
return ((D<<8)|(D>>8));
}
#endif
#ifndef PHYSFS_Swap32
-static __inline__ PHYSFS_uint32 PHYSFS_Swap32(PHYSFS_uint32 D)
+static inline PHYSFS_uint32 PHYSFS_Swap32(PHYSFS_uint32 D)
{
return ((D<<24)|((D<<8)&0x00FF0000)|((D>>8)&0x0000FF00)|(D>>24));
}
#endif
#ifndef PHYSFS_NO_64BIT_SUPPORT
#ifndef PHYSFS_Swap64
-static __inline__ PHYSFS_uint64 PHYSFS_Swap64(PHYSFS_uint64 val) {
+static inline PHYSFS_uint64 PHYSFS_Swap64(PHYSFS_uint64 val) {
PHYSFS_uint32 hi, lo;
/* Separate into high and low 32-bit values and swap them */
--- a/src/physfs_internal.h Sat Aug 21 14:05:39 2010 -0400
+++ b/src/physfs_internal.h Sat Aug 21 14:29:40 2010 -0400
@@ -32,7 +32,6 @@
/* !!! FIXME: if HAVE_ALLOCA_H would be good, too. */
#if sun
#include <alloca.h>
-#define __inline__ inline
#endif
#if defined(__sun) || defined(sun)
@@ -50,6 +49,14 @@
#define PHYSFS_MINIMUM_GCC_VERSION(major, minor) (0)
#endif
+#ifdef __cplusplus
+ /* C++ always has a real inline keyword. */
+#elif (defined macintosh) && !(defined __MWERKS__)
+# define inline
+#elif (defined _MSC_VER)
+# define inline __inline
+#endif
+
/*
* Interface for small allocations. If you need a little scratch space for
* a throwaway buffer or string, use this. It will make small allocations