bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnulib@gnu.org
Subject: Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL
Date: Sat, 18 Jan 2020 23:11:05 +0100	[thread overview]
Message-ID: <7822786.Q0zLdr4xnQ@omega> (raw)
In-Reply-To: <7d2bb233-b9f2-e3e0-24fd-b51ac52c63d8@cs.ucla.edu>

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  <bruno@clisp.org>

	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	other threads:[~2020-01-18 22:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 15:11 Messed up gl_COMPILER_PREPARE_CHECK_DECL Mats Erik Andersson
2020-01-10 20:14 ` Bruno Haible
2020-01-10 21:36   ` Mats Erik Andersson
2020-01-10 22:06   ` Paul Eggert
2020-01-10 22:47     ` Bruno Haible
2020-01-11  1:32       ` Paul Eggert
2020-01-13 19:02         ` Bruno Haible
2020-01-14  0:38           ` Paul Eggert
2020-01-18 13:14             ` Bruno Haible
2020-01-18 13:34               ` Bruno Haible
2020-01-18 15:31                 ` Mats Erik Andersson
2020-01-18 18:11                   ` Bruno Haible
2020-01-18 22:02                     ` Mats Erik Andersson
2020-01-18 22:19                       ` Bruno Haible
2020-01-18 21:39               ` Paul Eggert
2020-01-18 22:11                 ` Bruno Haible [this message]
2020-01-18 22:23                   ` Paul Eggert
2020-01-18 22:32                     ` Bruno Haible
2020-01-18 17:58             ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7822786.Q0zLdr4xnQ@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).