[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: doc: Mention gnulib putenv module?
From: |
Bruno Haible |
Subject: |
Re: doc: Mention gnulib putenv module? |
Date: |
Thu, 16 May 2024 14:45:06 +0200 |
Hi Collin,
> > But maybe something could be clarified:
> > - Does POSIX still not allow to remove an environment variable using
> > this function?
>
> I don't think that POSIX Issue 7 disallows it [1]. It appears that the
> behavior when '=' is not in the string is up for the implementation
> decide. This was reported in 2022 and the next revision will clarify
> that the environment variable can be removed or the function can fail
> with errno == EINVAL and a non-zero return value [2].
>
>
> > - On which platforms does the native putenv() not allow to remove an
> > environment variable using this function?
>
> Good question. The POSIX report is well written so I won't retype it
> here [2]. :)
OK, I see.
The way to deal with it, that is most consistent with the rest of Gnulib,
is as follows:
- Rename the 'putenv' module to 'putenv-gnu'.
- Also change its description from:
putenv() function: change or add an environment variable.
to:
putenv() function: change, add, or remove an environment variable.
- Rename the 'putenv-tests' module to 'putenv-gnu-tests'.
- Add a new 'putenv' module that is merely an indirection to 'putenv-gnu'
(for backward compatibility, in order not to break coreutils, gcal, guile,
octave, etc.). In the NEWS file mention
2024-MM-DD putenv This module is renamed to 'putenv-gnu'.
Bruno
- doc: Mention gnulib putenv module?, Collin Funk, 2024/05/16
- Re: doc: Mention gnulib putenv module?, Bruno Haible, 2024/05/16
- Re: doc: Mention gnulib putenv module?, Collin Funk, 2024/05/16
- Re: doc: Mention gnulib putenv module?,
Bruno Haible <=
- Re: doc: Mention gnulib putenv module?, Collin Funk, 2024/05/16
- Re: doc: Mention gnulib putenv module?, Bruno Haible, 2024/05/16
- Re: doc: Mention gnulib putenv module?, Collin Funk, 2024/05/16
- Re: doc: Mention gnulib putenv module?, Bruno Haible, 2024/05/16
- Re: doc: Mention gnulib putenv module?, Bruno Haible, 2024/05/17
- Re: doc: Mention gnulib putenv module?, Collin Funk, 2024/05/17