Hi Bruno, On 5/16/24 3:19 AM, Bruno Haible wrote: >> Is there a reason why the Gnulib putenv module isn't mentioned on this >> line or can I apply this diff with a ChangeLog entry? > > It is mentioned at the end of this file.
I saw. I was thinking maybe it should be mentioned on that line though. Similar to how execinfo was missing until a few days ago. > 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]. :) > I think this is related to very very old shells not having an 'unset' > primitive. Interesting. POSIX says that setenv() is preferred anyways. Collin [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/putenv.html [2] https://www.austingroupbugs.net/view.php?id=1598
