diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2014-10-28 21:43:12 -0400 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2014-10-30 13:39:44 +0000 |
commit | 79c977cf0a61b5f2ad724323c1676ba7e3abb2cc (patch) | |
tree | 19a76184ed6357434391cfe5f0617b9f13e77987 /wsutil/strptime.c | |
parent | c0a4a91ec20d2a91fe7b1d7ae3476e042ae86ba7 (diff) |
Remove the optional strncasecmp.{h,c} target (for systems that don't have that API).
strncasecmp() has been prohibited for years (in favor of the g_ascii_ version).
Change-Id: I64b7c29099b1c5240757e2026fe3490096a84755
Reviewed-on: https://code.wireshark.org/review/4980
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'wsutil/strptime.c')
-rw-r--r-- | wsutil/strptime.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/wsutil/strptime.c b/wsutil/strptime.c index 5a1eec1db1..d69a0199f3 100644 --- a/wsutil/strptime.c +++ b/wsutil/strptime.c @@ -30,10 +30,7 @@ #include <limits.h> #include <string.h> #include <time.h> - -#ifndef HAVE_STRNCASECMP -#include "wsutil/strncasecmp.h" -#endif +#include <glib.h> #ifdef _LIBC # include "../locale/localeinfo.h" @@ -75,13 +72,13 @@ localtime_r (t, tp) #if defined __GNUC__ && __GNUC__ >= 2 # define match_string(cs1, s2) \ ({ size_t len = strlen (cs1); \ - int result = strncasecmp ((cs1), (s2), len) == 0; \ + int result = g_ascii_strncasecmp ((cs1), (s2), len) == 0; \ if (result) (s2) += len; \ result; }) #else /* Oh come on. Get a reasonable compiler. */ # define match_string(cs1, s2) \ - (strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) + (g_ascii_strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) #endif /* We intentionally do not use isdigit() for testing because this will lead to problems with the wide character version. */ @@ -117,7 +114,7 @@ localtime_r (t, tp) while (*alts != '\0') \ { \ size_t len = strlen (alts); \ - if (strncasecmp (alts, rp, len) == 0) \ + if (g_ascii_strncasecmp (alts, rp, len) == 0) \ break; \ alts += len + 1; \ ++val; \ |