]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.h
334
[xonotic/darkplaces.git] / common.h
index 9da99680cc2399cbdb46734f24fee0c655351bf1..aa2d29d5b804b1648cd2540316ce569ae469a714 100644 (file)
--- a/common.h
+++ b/common.h
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef COMMON_H
 #define COMMON_H
 
+
 // MSVC has a different name for several standard functions
 #ifdef WIN32
 # define snprintf _snprintf
@@ -29,6 +30,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 # define strncasecmp strnicmp
 #endif
 
+// Create our own define for Mac OS X
+#if defined(__APPLE__) && defined(__MACH__)
+# define MACOSX
+#endif
+
 
 //============================================================================
 
@@ -229,7 +235,7 @@ char *SearchInfostring(const char *infostring, const char *key);
 
 // strlcat and strlcpy, from OpenBSD
 // Most (all?) BSDs already have them
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || (defined(__APPLE__) && defined(__MACH__))
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(MACOSX)
 # define HAVE_STRLCAT 1
 # define HAVE_STRLCPY 1
 #endif