bug-gnulib
[Top][All Lists]
Advanced

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

Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL


From: Bruno Haible
Subject: Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL
Date: Sat, 18 Jan 2020 23:11:05 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

> Although I haven't tried the patch, surely the name '~~gnulib.m4' causes 
> problems. I imagine some programs use '~' for other naming conventions (e.g., 
> for deleted files). On systems that use alphabetic characters first for 
> collating, 'ls' and 'echo *' don't put the '~~' file last anyway; this 
> happened 
> on my Ubuntu 18.04.3 machine in the en_US.utf8 locale.

The order that matters is not the one used by 'echo *', but the used by the
'aclocal' program when it creates aclocal.m4.

> On systems with GNU ls, 
> the leading '~' causes ls to quote the file name and to put spaces in front 
> of 
> other file names in the same directory, which is an annoyance (albeit a 
> necessary one to warn users of the problem with cutting and pasting that file 
> name). And if there is a user whose name happens to be '~gnulib.m4' 
> (admittedly 
> unlikely, but POSIX allows this as an extension), the string ~~gnulib.m4 will 
> expand to that user's home directory in the shell.

Similar things would hold for lt~obsolete.m4 from libtool.

> For all these reasons I suggest renaming the file to zzgnulib.m4.

In practice zzgnulib.m4 should be as good as ~~gnulib.m4, since hardly any
.m4 file has a name that starts with a '{', '|'. '}', or '~'. => Done:


2020-01-18  Bruno Haible  <address@hidden>

        Rename ~~gnulib.m4 to zzgnulib.m4.
        Suggested by Paul Eggert.
        * m4/zzgnulib.m4: Renamed from m4/~~gnulib.m4.
        * gnulib-tool (func_get_filelist): Update.
        * pygnulib/GLModuleSystem.py (getFiles): Likewise.

diff --git a/gnulib-tool b/gnulib-tool
index ba51606..89f6077 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -2294,7 +2294,7 @@ func_get_filelist ()
     fi
   fi
   echo m4/00gnulib.m4
-  echo 'm4/~~gnulib.m4'
+  echo m4/zzgnulib.m4
   echo m4/gnulib-common.m4
 }
 
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index 90e7e04..06eff4f 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -101,7 +101,7 @@ dnl AC_REQUIRE([gl_COMPILER_CLANG])
 ])
 dnl Redefine _AC_CHECK_DECL_BODY so that it references 
ac_compile_for_check_decl
 dnl instead of ac_compile.  If, for whatever reason, the override of AC_PROG_CC
-dnl in ~~gnulib.m4 is inactive, use the original ac_compile.
+dnl in zzgnulib.m4 is inactive, use the original ac_compile.
 m4_define([_AC_CHECK_DECL_BODY],
 [  ac_save_ac_compile="$ac_compile"
   if test -n "$ac_compile_for_check_decl"; then
diff --git a/m4/zzgnulib.m4 b/m4/zzgnulib.m4
index f476918..98fa68f 100644
--- a/m4/zzgnulib.m4
+++ b/m4/zzgnulib.m4
@@ -1,4 +1,4 @@
-# ~~gnulib.m4 serial 1
+# zzgnulib.m4 serial 1
 dnl Copyright (C) 2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index 72a6c9f..73c207d 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -544,7 +544,7 @@ Include:|Link:|License:|Maintainer:)'
                     parts += [line]
                 result = [part.strip() for part in parts if part.strip()]
             result += [joinpath('m4', '00gnulib.m4')]
-            result += [joinpath('m4', '~~gnulib.m4')]
+            result += [joinpath('m4', 'zzgnulib.m4')]
             result += [joinpath('m4', 'gnulib-common.m4')]
             self.cache['files'] = list(result)
         return(list(self.cache['files']))




reply via email to

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