r328 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jun 18 15:45:54 EDT 2007


Author: icculus
Date: 2007-06-18 15:45:06 -0400 (Mon, 18 Jun 2007)
New Revision: 328

Modified:
   trunk/universal.h
Log:
Forcibly #undef things that might be big nasty macros under glibc, so we can
 redefine them to something that fails the compile if you try to use them.  :)


Modified: trunk/universal.h
===================================================================
--- trunk/universal.h	2007-06-02 04:55:25 UTC (rev 327)
+++ trunk/universal.h	2007-06-18 19:45:06 UTC (rev 328)
@@ -114,15 +114,53 @@
 // strncpy() that promises to null-terminate the string, even on overflow.
 char *xstrncpy(char *dst, const char *src, size_t len);
 
+
+#ifdef malloc
+#undef malloc
+#endif
 #define malloc(x) DO_NOT_CALL_MALLOC__USE_XMALLOC_INSTEAD
+
+#ifdef calloc
+#undef calloc
+#endif
 #define calloc(x,y) DO_NOT_CALL_CALLOC__USE_XMALLOC_INSTEAD
+
+#ifdef realloc
+#undef realloc
+#endif
 #define realloc(x,y) DO_NOT_CALL_REALLOC__USE_XREALLOC_INSTEAD
+
+#ifdef strdup
+#undef strdup
+#endif
 #define strdup(x) DO_NOT_CALL_STRDUP__USE_XSTRDUP_INSTEAD
+
+#ifdef strncpy
+#undef strncpy
+#endif
 #define strncpy(x,y,z) DO_NOT_CALL_STRNCPY__USE_XSTRNCPY_INSTEAD
-//#define strcasecmp(x,y) DO_NOT_CALL_STRCASECMP__USE_UTF8STRICMP_INSTEAD
-//#define stricmp(x,y) DO_NOT_CALL_STRICMP__USE_UTF8STRICMP_INSTEAD
-//#define strcmpi(x,y) DO_NOT_CALL_STRCMPI__USE_UTF8STRICMP_INSTEAD
 
+#if 0  // !!! FIXME: write me.
+#ifdef strcasecmp
+#undef strcasecmp
+#endif
+#define strcasecmp(x,y) DO_NOT_CALL_STRCASECMP__USE_UTF8STRICMP_INSTEAD
+#endif
+
+#if 0  // !!! FIXME: write me.
+#ifdef stricmp
+#undef stricmp
+#endif
+#define stricmp(x,y) DO_NOT_CALL_STRICMP__USE_UTF8STRICMP_INSTEAD
+#endif
+
+#if 0  // !!! FIXME: write me.
+#ifdef strcmpi
+#undef strcmpi
+#endif
+#define strcmpi(x,y) DO_NOT_CALL_STRCMPI__USE_UTF8STRICMP_INSTEAD
+#endif
+
 // Localization support.
 const char *translate(const char *str);
 #ifdef _




More information about the mojosetup-commits mailing list