diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-01-29 16:47:51 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-01-29 16:48:30 -0800 |
commit | b58d0cb8fb12dd14e2fb6ba5f48b5ea461b005a1 (patch) | |
tree | d2bee14e08cb9961d28f74d8f00cc3fa855daae8 | |
parent | baa7dd2be88e43303842b253c30490b0eb175f1e (diff) | |
download | gnulib-b58d0cb8fb12dd14e2fb6ba5f48b5ea461b005a1.tar.gz |
dfa: do not depend on isblank
This removes a difference between Gawk dfa.c and Gnulib dfa.c.
* lib/dfa.c (isblank): Define if neither system nor Gnulib does.
* modules/dfa (Depends-on): Remove isblank.
* modules/isblank: Add a module indicator, for lib/dfa.c.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/dfa.c | 10 | ||||
-rw-r--r-- | modules/dfa | 1 | ||||
-rw-r--r-- | modules/isblank | 1 |
4 files changed, 17 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2020-01-29 Paul Eggert <eggert@cs.ucla.edu> + dfa: do not depend on isblank + This removes a difference between Gawk dfa.c and Gnulib dfa.c. + * lib/dfa.c (isblank): Define if neither system nor Gnulib does. + * modules/dfa (Depends-on): Remove isblank. + * modules/isblank: Add a module indicator, for lib/dfa.c. + dfa: do not assume 64-bit int Problem reported for VAX/VMS C (!) by Arnold Robbins in: https://lists.gnu.org/r/bug-gnulib/2020-01/msg00173.html @@ -81,6 +81,16 @@ isasciidigit (char c) # undef clrbit #endif +/* For code that does not use Gnulib’s isblank module. */ +#if !defined isblank && !defined HAVE_ISBLANK && !defined GNULIB_ISBLANK +# define isblank dfa_isblank +static int +isblank (int c) +{ + return c == ' ' || c == '\t'; +} +#endif + /* First integer value that is greater than any character code. */ enum { NOTCHAR = 1 << CHAR_BIT }; diff --git a/modules/dfa b/modules/dfa index 9b112afbae..ade4b5a2a5 100644 --- a/modules/dfa +++ b/modules/dfa @@ -13,7 +13,6 @@ c99 ctype flexmember intprops -isblank locale regex stdbool diff --git a/modules/isblank b/modules/isblank index dd43acad1f..ff4831b16e 100644 --- a/modules/isblank +++ b/modules/isblank @@ -14,6 +14,7 @@ gl_FUNC_ISBLANK if test $HAVE_ISBLANK = 0; then AC_LIBOBJ([isblank]) fi +gl_MODULE_INDICATOR([isblank]) gl_CTYPE_MODULE_INDICATOR([isblank]) Makefile.am: |