Karl Berry | 1 Jan 16:01 2003

gnulib-tool buglets

I made three minor changes to gnulib-tool.  First, I got this error on
every invocation:

$ gnulib-tool --list
sed: -e expression #1, char 22: multiple number options to `s' command

which comes from this line:
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$Date: 2003/01/01 14:51:23 $,,'`
which I changed to:
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
to avoid the expansion of $Date$, which I think was the intent.
Now the --version output looks better.

Second, I said
  gnulib-tool --create-testdir --dir . mkstemp tempname
and it said:
mkdir: cannot create directory `.': File exists
gnulib-tool: *** could not create destination directory

So I changed this line:
  mkdir "$destdir" || func_fatal_error "could not create destination directory"
to this:
  mkdir "$destdir"
  test -d "$destdir" \
    || func_fatal_error "could not create destination directory"

Third, when I said
  gnulib-tool --create-testdir --dir foo . mkstemp tempname
it also said:
gnulib-tool: module  doesn't exist
(Continue reading)

Karl Berry | 4 Jan 04:25 2003

Re: small suggestion for texi2dvi

Hi Kurt,

            POSIX 1003.1-2001 no longer requires `egrep', but many older
         hosts do not yet support the POSIX replacement `grep -E'.

Yeah.  This is one of the things that I find unfathomable about recent
POSIX.  How can they possibly no longer require egrep and fgrep?  They
have been used in zillions of scripts for 25+ years.  I don't wish to
cater to their (IMHO) stupidity.

That said, there's no harm in your suggestion of
	egrep=${EGREP-egrep}
	fgrep=${FGREP-fgrep}
so I'll do that.  Thanks.

    [As an aside, the Autoconf docs also claim that ${VAR:-value} is not
    portable and one should use ${VAR-liternal} instead if possible...]

Yes.  Interestingly, it was an Autoconf maintainer (Akim) who put in a
number of those ${VAR:-value} expressions :).  I'm not sure if there's a
deep reason behind it.  (I kind of doubt it.)  Akim?  (Hey, and welcome
back.)

Thanks,
karl

Date: Fri, 3 Jan 2003 18:11:58 +0100
From: Kurt Hornik <hornik <at> ci.tuwien.ac.at>
To: Karl Berry <karl <at> gnu.org>
CC: Kurt Hornik <Kurt.Hornik <at> wu-wien.ac.at>
(Continue reading)

Jim Meyering | 4 Jan 00:55 2003
Picon

Re: autoconf macros for each module

Happy new year!

Bruno Haible <bruno <at> clisp.org> wrote:
> I've added this patch. It gives an independent .m4 file for each module. This
> is part of "make is easy to use gnulib modules in other packages". I'll
> explain in a separate mail what this means for existing packages (esp. Jim).
>
> 2002-12-24  Bruno Haible  <bruno <at> clisp.org>
>
> 	General infrasructure.
> 	* README: Rewritten.
... 3000+ lines! ...

Wow!
Thanks for all that work, Bruno!

Hoping to catch up on all this soon...

Jim
Bruno Haible | 6 Jan 13:48 2003

Re: gnulib-tool buglets

Karl Berry writes:
> which comes from this line:
> last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$Date: 2003/01/01 14:51:23 $,,'`

He he, that was not intended. Thanks for fixing it.

> Second, I said
>   gnulib-tool --create-testdir --dir . mkstemp tempname
> and it said:
> mkdir: cannot create directory `.': File exists
> gnulib-tool: *** could not create destination directory

This was meant as a safety measure but if you don't like it, it's fine
with me.

> Third, when I said
>   gnulib-tool --create-testdir --dir foo . mkstemp tempname
> it also said:
> gnulib-tool: module  doesn't exist
> So I changed:
>     echo "gnulib-tool: module $1 doesn't exist" 1>&2
> to
>     echo "gnulib-tool: module $module doesn't exist" 1>&2

ok, thanks.

Bruno
Bruno Haible | 7 Jan 14:35 2003

Re: getstr(), readline()

Paul Eggert wrote:
> However, it'd be better to simply change
> the names rather than try to support both the old (colliding) names
> and the new (better-chosen, noncolliding) names, as that will avoid
> confusion in the future, and it will let people use both gnulib and
> the colliding names in the same module.
> 
> Also, nobody was invoking gnulib getstr directly as far as I know;
> it was purely a helper function.  So it should be private anyway.

Agreed.

> How about this untested patch to simplify things accordingly?  I don't
> really know how the module stuff works yet, so the modules changes are
> a bit of a guess.

The patch looks good except for one thing: In m4/getline.m4 the
added prerequisites for lib/getline.c should go into the macro
gl_PREREQ_GETLINE, not AM_FUNC_GETLINE. Of course in this case,
since it's only an AC_REQUIRE, it doesn't matter, but still I think
this separation (explained in detail in m4/README) is good because
  - If getline.c is not compiled on a particular platform, it's not
    necessary to check for its prerequisites.
  - If another file foobar.c would #include "getline.c", it should
    be sufficient to mention
      AC_REQUIRE([gl_PREREQ_GETLINE])
    inside gl_PREREQ_FOOBAR. We have this situation a couple of times
    with strtol.c and similar files.

The patches to MODULES.txt are not be necessary any more.
(Continue reading)

Bruno Haible | 7 Jan 14:34 2003

MODULES.html replaces MODULES.txt

Hi,

MODULES.txt is now obsolete; instead please refer to MODULES.html
which is automatically generated through
    ./MODULES.html.sh > MODULES.html

Karl, can you ensure that MODULES.html is regenerated from
MODULES.html.sh on a daily basis by your cron jobs?

Bruno
Karl Berry | 6 Jan 15:38 2003

Re: gnulib-tool buglets

    This was meant as a safety measure but if you don't like it, it's fine
    with me.

I don't mind either way, but I think . and .. should work.
Jim Meyering | 6 Jan 15:19 2003
Picon

full-write.c / full-read.c consolidation

Any objection to this?

	* full-write.c: Rework so that it may serve to define full_read, too.
	* full-read.c: Simply #define FULL_READ and include full-write.c.

With the above change, full-read.c is just two lines (modulo copyright):

  #define FULL_READ
  #include "full-write.c"

And here's full-write.c:

/* An interface to read and write that retries (if necessary) until complete.

   Copyright (C) 1993, 1994, 1997-2003 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
(Continue reading)

Karl Berry | 7 Jan 20:29 2003

Re: MODULES.html replaces MODULES.txt

    Karl, can you ensure that MODULES.html is regenerated from
    MODULES.html.sh on a daily basis by your cron jobs?

Sure, I will work on this.
Bruno Haible | 6 Jan 13:38 2003

Re: inttypes.h and stdint.h

Paul Eggert writes:
> the C standardization committee invented
> <stdint.h> to contain those parts of <inttypes.h> that are useful even
> in freestanding C environments, i.e., environments without standard C
> libraries. ...

I see.

> It shouldn't hurt to use the same pattern everywhere

OK, I've committed the change.

Bruno

Gmane