bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] xalloc module dependencies


From: Gary V. Vaughan
Subject: Re: [Bug-gnulib] xalloc module dependencies
Date: Wed, 31 Mar 2004 13:35:56 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Meyering wrote:
| "Gary V. Vaughan" <address@hidden> wrote:
|
|>xmalloc.c contains the following code:
|>
|>void *
|>xzalloc (size_t s)
|>{
|>~  return memset (xmalloc (s), 0, s);
|>}
|>
|>void *
|>xclone (void const *p, size_t s)
|>{
|>~  return memcpy (xmalloc (s), p, s);
|>}
|>
|>shouldn't xalloc Depends-on: cite memset and memcpy?
|
|
| At first glance, I'd agree, but then I see that no other module depends
| on either of those, in spite of the fact that those functions are used
| in over 30 of gnulib's lib/*.c files.
|
| So either it doesn't matter (because all systems provide those
| two functions), or people have been adding those files manually,
| or no one is using gnulib.

So we should either:

~   - remove memset and memcpy from gnulib, because all supported systems
~     provide their own

or:

~   - add the memset and memcpy dependencies to all modules that use them,
~     otherwise the dependant modules won't work on systems that don't have
~     their own memset/memchr


On a related note (I'm thinking of porting libltdl to gnulib), libltdl has
implementations of strcmp, strchr and strrchr (presumably from bcmp, index
and rindex days).  Should I submit them for inclusion in gnulib, or do all
gnulib supported systems provide their own?

On an unrelated note, libltdl has standalone implementations of argz_append,
argz_insert, argz_create_sep, argz_next and argz_stringify.  Should I submit
them for inclusion in gnulib?  As a single argz module (in which case we
need standalone argz_create, argz_count, argz_extract, argz_add,
argz_add_sep, argz_delete and argz_replace)?  Or each function as a module?

Cheers,
        Gary.
Cheers,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAarssFRMICSmD1gYRAqyxAKCUX48P7LmSDsLfh8GVjqP6JzubLACeOkGk
APwjgS8RzaC46X2KKAl/jq4=
=402+
-----END PGP SIGNATURE-----




reply via email to

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