From caa70a3d343f8adb6385d3da8a3c4f5ab0333ea7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 15 Sep 2011 01:00:17 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ m4/absolute-header.m4 | 10 +++++----- m4/include_next.m4 | 10 ++++++---- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ea82f976..c5cb4f48f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-09-14 Bruno Haible + 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. diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 index b6ace9321..b7276a3b2 100644 --- a/m4/absolute-header.m4 +++ b/m4/absolute-header.m4 @@ -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. diff --git a/m4/include_next.m4 b/m4/include_next.m4 index 14a1009b5..d5230ced8 100644 --- a/m4/include_next.m4 +++ b/m4/include_next.m4 @@ -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 }' -- 2.11.0