[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strdup
From: |
Bruno Haible |
Subject: |
Re: strdup |
Date: |
Thu, 18 Sep 2008 12:47:27 +0200 |
User-agent: |
KMail/1.5.4 |
Hi Simon,
> Are there any platforms we care about that lack strdup?
>
> doc/posix-functions/strdup.texi contains:
>
> Portability problems fixed by Gnulib:
> @itemize
> @item
> This function is missing on some old platforms.
> @item
> This function has no prototype in @code{<string.h>} on some old platforms.
> @end itemize
>
> There are a few gnulib modules that depend directly on strdup. Several
> other gnulib modules appear to use strdup without depending on strdup.
> See grep output below.
>
> I'm wondering if we could remove the dependencies, trusting that
> maintainers who care about platforms without strdup will add it
> manually.
It is correct that strdup is available everywhere nowadays. However, we
might want to change the 'strdup' module so that it provides a POSIX compliant
function (one that sets errno to ENOMEM when it fails). The module
does not do so currently.
For reasons like this, I find it better if we leave the explicit dependencies
in the module descriptions, and if the people who _don't_ want this module
pass '--avoid=strdup' to gnulib-tool.
Bruno
- strdup, Simon Josefsson, 2008/09/18
- Re: strdup,
Bruno Haible <=
- Re: strdup, Simon Josefsson, 2008/09/18