Mercurial > hg > octave-jordi > gnulib-hg
diff lib/regex_internal.h @ 8153:0f48fdcc7a64
Fix regex code so it doesn't rely on strcasecmp.
* lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
Otherwise, include gnulib's langinfo.h.
* lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
undesirable behavior in non-C locales. Instead, rely on locale_charset.
* m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
* modules/regex (FILES): Remove m4/codeset.m4.
(Depends-on): Add localcharset. Remove strcase.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Thu, 15 Feb 2007 00:16:55 +0000 |
parents | eaa00773406b |
children | 28ffab893f7a |
line wrap: on
line diff
--- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -27,8 +27,10 @@ #include <stdlib.h> #include <string.h> -#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC +#ifdef _LIBC # include <langinfo.h> +#else +# include "localcharset.h" #endif #if defined HAVE_LOCALE_H || defined _LIBC # include <locale.h>