Avoid using #, the m4 comment starter character, near brackets.
authorBruno Haible <bruno@clisp.org>
Wed, 14 Sep 2011 23:00:17 +0000 (01:00 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 14 Sep 2011 23:00:17 +0000 (01:00 +0200)
* m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Use |, not #, as
delimiter character in sed expressions.
* m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
Suggested by Eric Blake.

ChangeLog
m4/absolute-header.m4
m4/include_next.m4

index 7ea82f9..c5cb4f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-09-14  Bruno Haible  <bruno@clisp.org>
 
+       Avoid using #, the m4 comment starter character, near brackets.
+       * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER_ONE): Use |, not #, as
+       delimiter character in sed expressions.
+       * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Likewise.
+       Suggested by Eric Blake.
+
        Properly quote AC_CHECK_DECLS' 4th argument.
        * m4/c-stack.m4 (gl_PREREQ_C_STACK): Double-quote AC_CHECK_DECLS' 4th
        argument.
index b6ace93..b7276a3 100644 (file)
@@ -1,4 +1,4 @@
-# absolute-header.m4 serial 14
+# absolute-header.m4 serial 15
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -81,13 +81,13 @@ changequote(,)
       gl_dirsep_regex='/'
       ;;
   esac
-changequote([,])
-  gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'$1#{
-      s#.*"\(.*'"${gl_dirsep_regex}"'$1\)".*#\1#
-      s#^/[^/]#//&#
+  gl_absolute_header_sed='\|'"${gl_dirsep_regex}"'$1|{
+      s|.*"\(.*'"${gl_dirsep_regex}"'$1\)".*|\1|
+      s|^/[^/]|//&|
       p
       q
     }'
+changequote([,])
   dnl eval is necessary to expand gl_absname_cpp.
   dnl Ultrix and Pyramid sh refuse to redirect output of eval,
   dnl so use subshell.
index 14a1009..d5230ce 100644 (file)
@@ -1,4 +1,4 @@
-# include_next.m4 serial 21
+# include_next.m4 serial 22
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -223,9 +223,11 @@ changequote(,)
                    ;;
                esac
 changequote([,])
-               gl_absolute_header_sed='\#'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[#{
-                   s#.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*#\1#
-                   s#^/[^/]#//&#
+               gl_absolute_header_sed='\|'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[|{
+                   s|.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*|\1|
+changequote(,)dnl
+                   s|^/[^/]|//&|
+changequote([,])dnl
                    p
                    q
                  }'