Added support to the unix build system for explicitely specifying the name of

the define to set to show when a symbol is found.
Also a fix for when 'strcasecmp' is #define'd by the system.



git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2881 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2007-12-23 04:41:19 +00:00
parent 27bc2ea336
commit 23c74b2b63
8 changed files with 101 additions and 35 deletions
+4
View File
@@ -37,6 +37,10 @@
/* Defined if your system has strupr of its own */
@HAVE_STRUPR@
/* Defined if your system has strcasecmp of its own */
@HAVE_STRCASECMP_UQM@
// Not using "HAVE_STRCASECMP" as that conflicts with SDL.
/* Defined if your system has stricmp of its own */
@HAVE_STRICMP@
+4
View File
@@ -38,6 +38,10 @@
/* Defined if your system has strupr of its own */
@HAVE_STRUPR@
/* Defined if your system has strcasecmp of its own */
@HAVE_STRCASECMP_UQM@
// Not using "HAVE_STRCASECMP" as that conflicts with SDL.
/* Defined if your system has stricmp of its own */
@HAVE_STRICMP@
+4
View File
@@ -38,6 +38,10 @@
/* Defined if your system has strupr of its own */
#define HAVE_STRUPR
/* Defined if your system has strcasecmp of its own */
#undef HAVE_STRCASECMP_UQM
// Not using "HAVE_STRCASECMP" as that conflicts with SDL.
/* Defined if your system has stricmp of its own */
#define HAVE_STRICMP
+10 -2
View File
@@ -45,12 +45,20 @@
# include <unistd.h>
#endif
#ifndef HAVE_STRICMP
// Using "HAVE_STRCASECMP_UQM" instead of "HAVE_STRCASECMP" as the latter
// conflicts with SDL.
#if !defined(HAVE_STRICMP) && !defined(HAVE_STRCASECMP_UQM)
# error Neither stricmp() nor strcasecmp() is available.
#elif defined(HAVE_STRCASECMP_UQM)
# define stricmp strcasecmp
#else
#elif defined(HAVE_STRICMP)
# define strcasecmp stricmp
#else
// We should take care not to define anything if both strcasecmp() and
// stricmp() are defined, as one might exist as a macro to the other.
#endif
#ifndef HAVE_STRUPR
char *strupr (char *str);
#endif