diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-11-11 11:06:02 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-11-11 11:06:02 -0800 |
commit | 8ea06128c70b07c265a217222f2a245aad4bfce4 (patch) | |
tree | c0bdd4b2b3676927b4f1c26866c0baaf8d9210e3 /utils.h | |
parent | 89c8317ad84386f69d31f38dcddbc7ff0abffb31 (diff) |
Include strings.h for strcasecmp and string.h for strdup
Our minimum requirement for X11 is currently Unix98. Unix98 provides
strcasecmp in <strings.h>. This commit fixes implicit declarations
of this function on systems that closely adhere to the standard.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -196,6 +196,7 @@ uInformation(const char * /* s */ , ... (s1)!=(s2):strcmp(s1,s2)) #define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0) #ifdef HAVE_STRCASECMP +#include <strings.h> #define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2)) #define uStrCasePrefix(p,s) (strncasecmp(p,s,strlen(p))==0) #else @@ -207,6 +208,7 @@ uInformation(const char * /* s */ , ... ); #endif #ifdef HAVE_STRDUP +#include <string.h> #define uStringDup(s1) ((s1) ? strdup(s1) : NULL) #else extern char *uStringDup(const char * /* s1 */ |