Added PHYSFS_DEPRECATED.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 21 Aug 2010 14:05:39 -0400
changeset 1099 fd12454c37ee
parent 1098 4e86cec1143f
child 1100 f90724e3b4c6
Added PHYSFS_DEPRECATED.
src/physfs.h
--- a/src/physfs.h	Sat Aug 21 02:47:58 2010 -0400
+++ b/src/physfs.h	Sat Aug 21 14:05:39 2010 -0400
@@ -239,6 +239,16 @@
 #define PHYSFS_DECL
 #endif
 
+#if defined(PHYSFS_DEPRECATED)
+/* do nothing. */
+#elif (defined SWIG)  /* ignore deprecated, since bindings use everything. */
+#define PHYSFS_DEPRECATED
+#elif (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */
+#define PHYSFS_DEPRECATED __attribute__((deprecated))
+#else
+#define PHYSFS_DEPRECATED
+#endif
+
 #if 0  /* !!! FIXME: look into this later. */
 #if defined(PHYSFS_CALL)
 /* do nothing. */
@@ -1248,7 +1258,8 @@
 PHYSFS_DECL PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle,
                                       void *buffer,
                                       PHYSFS_uint32 objSize,
-                                      PHYSFS_uint32 objCount);
+                                      PHYSFS_uint32 objCount)
+                                        PHYSFS_DEPRECATED;
 
 /**
  * \fn PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
@@ -1275,7 +1286,8 @@
 PHYSFS_DECL PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle,
                                        const void *buffer,
                                        PHYSFS_uint32 objSize,
-                                       PHYSFS_uint32 objCount);
+                                       PHYSFS_uint32 objCount)
+                                        PHYSFS_DEPRECATED;
 
 
 /* File position stuff... */