I suggest this is wrong, and that the appropriate table should be built. EBCDIC platforms do have i18n (typicially single-byte) lower/upper equivalences, and the underlying implementation should not be trusted for straight ASCII token case insensitive comparisons.
On Sat, Nov 21, 2015 at 1:35 PM, <[email protected]> wrote: > Author: covener > Date: Sat Nov 21 19:35:24 2015 > New Revision: 1715554 > > URL: http://svn.apache.org/viewvc?rev=1715554&view=rev > Log: > stick with underlying strcasecmp on EBCDIC builds > > > Modified: > httpd/httpd/trunk/server/util.c > > Modified: httpd/httpd/trunk/server/util.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1715554&r1=1715553&r2=1715554&view=diff > > ============================================================================== > --- httpd/httpd/trunk/server/util.c (original) > +++ httpd/httpd/trunk/server/util.c Sat Nov 21 19:35:24 2015 > @@ -3172,6 +3172,7 @@ AP_DECLARE(int) ap_array_str_contains(co > return (ap_array_str_index(array, s, 0) >= 0); > } > > +#if !APR_CHARSET_EBCDIC > /* > * Provide our own known-fast implementation of str[n]casecmp() > * NOTE: ASCII only! > @@ -3238,3 +3239,14 @@ AP_DECLARE(int) ap_strncasecmp(const cha > } > return (0); > } > +#else > +AP_DECLARE(int) ap_strcasecmp(const char *s1, const char *s2) > +{ > + return strcasecmp(s1, s2); > +} > + > +AP_DECLARE(int) ap_strncasecmp(const char *s1, const char *s2, apr_size_t > n) > +{ > + return strncasecmp(s1, s2, n); > +} > +#endif /*APR_CHARSET_EBCDIC*/ > > >
