[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enforcing the use of string.h related modules

From: Eric Blake
Subject: Re: enforcing the use of string.h related modules
Date: Thu, 1 Feb 2007 05:00:46 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> Contrary to the Changelog entry, I don't see gl_STRING_MODULE_INDICATOR 
> in string_h.m4.

I see that while I was typing this, you checked in your original proposed 
change.  But with your patch applied, I get the following:

gcc  -I. -I../../lib     -g2 -Wall -Werror -MT regex.o -MD -MP -
MF .deps/regex.Tpo -c -o regex.o ../../lib/regex.c
In file included from ../../lib/regex.c:61:
../../lib/regcomp.c: In function `rpl_regerror':
../../lib/regcomp.c:548: warning: implicit declaration of function 
../../lib/regcomp.c: In function `init_dfa':
../../lib/regcomp.c:896: warning: implicit declaration of function 
make[2]: *** [regex.o] Error 1

One of those is due to the fact that regex did not pull in mempcpy; the other 
is due to an m4 bug on your part (the translit should be part of the definition 
of gl_STRING_MODULE_INDICATOR, not done prior to defining it).  So I'm checking 
in the patch below.

By the way, any reason you spell out abc...yz rather than relying in GNU m4's 
translit range semantics?  Since autoconf requires GNU m4 1.4 or better, and 
since no existing GNU m4 honors locale, translit(foo,a-z,A-Z) reliably produces 
FOO.  Then again, I guess this could change in a future m4 2.x, if locale 
support is properly introduced into m4.  Meanwhile, it would be nice if 
autoconf documented as_cr_letters and as_cr_LETTERS, so we could use them 
without worries, for fewer characters to acheive the same result.

Also, I noticed that the dependency of
string.h: string_h
is not strong enough - fixing your typo changed configure from declaring 
GNULIB_strcase to GNULIB_STRCASE, but did not regenerate string.h, so I had to 
manually remove it.  The problem is that I am not sure what else changes; 
adding a dependency on config.status doesn't seem to be the right thing to do.  
At any rate, it is more than just the string module that is affected by this 
missing dependency - all of the generated headers have the same problem.

2007-01-31  Eric Blake  <address@hidden>

        * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
        * modules/string (Makefile.am): Remove redundant replacement.
        * modules/regex (Depends-on): Add mempcpy.

Index: m4/string_h.m4
RCS file: /sources/gnulib/gnulib/m4/string_h.m4,v
retrieving revision 1.4
diff -u -r1.4 string_h.m4
--- m4/string_h.m4      1 Feb 2007 04:39:46 -0000       1.4
+++ m4/string_h.m4      1 Feb 2007 04:58:09 -0000
@@ -50,7 +50,7 @@
   dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUV
+  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQR
Index: modules/regex
RCS file: /sources/gnulib/gnulib/modules/regex,v
retrieving revision 1.20
diff -u -r1.20 regex
--- modules/regex       16 Jan 2007 16:31:23 -0000      1.20
+++ modules/regex       1 Feb 2007 04:58:09 -0000
@@ -16,6 +16,7 @@
Index: modules/string
RCS file: /sources/gnulib/gnulib/modules/string,v
retrieving revision 1.3
diff -u -r1.3 string
--- modules/string      1 Feb 2007 00:29:52 -0000       1.3
+++ modules/string      1 Feb 2007 04:58:09 -0000
@@ -27,7 +27,6 @@
              -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
              -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
              -e 's|@''GNULIB_STRCASE''@|$(GNULIB_STRCASE)|g' \
-             -e 's|@''GNULIB_STRCASE''@|$(GNULIB_STRCASE)|g' \
              -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
              -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
              -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]