]> Savannah Git Hosting - gnulib.git/commitdiff
printf-posix: Fix mingw build
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 4 Jul 2016 07:10:59 +0000 (09:10 +0200)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Jul 2016 07:21:45 +0000 (09:21 +0200)
Commit 54615b95ff238e235e806855efc46a9abad09f2e changed the regular
expression for detecting C symbol prefixes but forgot to qoute square
brackets in the command line arguments for grep.  That way when
building with mingw the condition was false although it ought to be
true instead.  In particular scenarios this led to the following
compile error:

    Cannot export rpl_printf: symbol not found
    Cannot export rpl_scanf: symbol not found
    collect2: error: ld returned 1 exit status

Fix this by properly quoting square brackets.

ChangeLog
m4/asm-underscore.m4

index ef332683bb8afce5ecad2c5e06dc8d1e1f2bda82..38c613ca85d5aad202d51a29268ba13f2fc3bcdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2016-07-04  Martin Kletzander  <mkletzan@redhat.com>
+
+       printf-posix: Fix mingw build
+       Commit 54615b95ff238e235e806855efc46a9abad09f2e changed the regular
+       expression for detecting C symbol prefixes but forgot to qoute square
+       brackets in the command line arguments for grep.  That way when
+       building with mingw the condition was false although it ought to be
+       true instead.  In particular scenarios this led to the following
+       compile error:
+
+           Cannot export rpl_printf: symbol not found
+           Cannot export rpl_scanf: symbol not found
+           collect2: error: ld returned 1 exit status
+
+       Fix this by properly quoting square brackets.
+
 2016-07-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        mktime: call tzset as per POSIX
index 547dd62d26a4e158a4637435f5719612f7224a4e..feca18db9bd68ebd0357d2fe0ed904f396533f23 100644 (file)
@@ -29,7 +29,7 @@ int foo(void) { return 0; }
 EOF
      # Look for the assembly language name in the .s file.
      AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
-     if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
+     if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
        gl_cv_prog_as_underscore=yes
      else
        gl_cv_prog_as_underscore=no