[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Reorganization (was: Re: addition: pipe.h, pipe-in.c, pipe-
From: |
Simon Josefsson |
Subject: |
[Bug-gnulib] Reorganization (was: Re: addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c) |
Date: |
Fri, 30 Jan 2004 00:58:17 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Paul Eggert <address@hidden> writes:
>> other modules (physmem, idcache, userspec, xgetdomainnname etc.) are
>> more rarely used than 'pipe'.
>
> Yes, there's probably other junk in gnulib too. At some point someone
> should do some housecleaning. Or reorganization. Or something.
> Gnulib is becoming a bit unwieldy.
If someone does this, here's something I'd like: parametrization of
some modules so they can work more standalone.
My main example is the xalloc module, which depend on error,
unlocked-io, extensions, exitfail, inline, gettext and other stuff,
which brings in a considerable amount of code for something that
ideally should be a simple wrapper around malloc and friends.
Since I use the code in a library used by server processes, the
printed error message will rarely be seen even in the remote cases
when an out of memory condition do occur, so I don't consider it that
important, but even so I replaced:
error (exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
with[1]
errno = ENOMEM;
perror (PACKAGE);
which for my uses is about as flexible, and remove most of the
problematic dependencies. It might even be better internationalized
because I believe the errno errors are widely translated, whereas the
xalloc_msg_memory_exhausted string must be translated manually in
every package that uses xalloc.
I might have made similar modifications to other modules as well. I
rather dislike forking the code from gnulib, but I haven't come up
with a clean patch that I have any confidence in proposing.
[1] Perhaps using 'errno' as a rvalue isn't portable, so I'm not
seriously proposing the above, but it serves as an illustration.
- [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Bruno Haible, 2004/01/27
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Paul Eggert, 2004/01/27
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Bruno Haible, 2004/01/27
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Paul Eggert, 2004/01/28
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Bruno Haible, 2004/01/29
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Paul Eggert, 2004/01/29
- [Bug-gnulib] Reorganization (was: Re: addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c),
Simon Josefsson <=
- Re: [Bug-gnulib] Reorganization, Jim Meyering, 2004/01/30
- [Bug-gnulib] Re: Reorganization, Simon Josefsson, 2004/01/30
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Jim Meyering, 2004/01/30
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Bruno Haible, 2004/01/30
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Jim Meyering, 2004/01/30
- Re: [Bug-gnulib] addition: pipe.h, pipe-in.c, pipe-out.c, pipe-bidi.c, Bruno Haible, 2004/01/30