iconv: document not-fixed bugs, using POSIX terminology

2020-12-19 Thread Noah Misch
iconv.m4 clears HAVE_ICONV if it detects iconv() bugs. Docs list those bugs under "Portability problems fixed by Gnulib:". If changing HAVE_ICONV were enough to qualify as a fix, then "This function is missing on some platforms" would also belong under that heading. I'm proposing to move those b

Re: free-posix: New module, renamed from 'free'

2020-12-19 Thread Paul Eggert
On 12/19/20 1:28 PM, Bruno Haible wrote: when you write int saved_errno = errno; free (ptr); errno = saved_errno; GCC may transform this to just free (ptr); Reported at . Ouch. Yet another reason 'free' should preserve

Re: free-posix: New module, renamed from 'free'

2020-12-19 Thread Bruno Haible
Paul Eggert wrote: > Unfortunately the test fails on Ubuntu 20.10 (and I assume on other > GNU/Linux hosts). And although the test fails, GCC makes optimizations that assume that free() preserves errno. In particular, when you write int saved_errno = errno; free (ptr); errno = saved_

Re: free-posix: New module, renamed from 'free'

2020-12-19 Thread Bruno Haible
Paul Eggert wrote: > > I'm adding a unit test for the "free() preserves errno" feature. > > Thanks. Unfortunately the test fails on Ubuntu 20.10 (and I assume on other > GNU/Linux hosts). So I installed the attached patch to port the free-posix > module to GNU/Linux (!). Thanks; I intended to p

Re: free-posix: New module, renamed from 'free'

2020-12-19 Thread Paul Eggert
On 12/19/20 5:53 AM, Bruno Haible wrote: I'm adding a unit test for the "free() preserves errno" feature. Thanks. Unfortunately the test fails on Ubuntu 20.10 (and I assume on other GNU/Linux hosts). So I installed the attached patch to port the free-posix module to GNU/Linux (!). Perhaps s

Re: free-posix: New module, renamed from 'free'

2020-12-19 Thread Bruno Haible
I'm adding a unit test for the "free() preserves errno" feature. The idea for the Linux specific test is from where Rich Felker wrote: free can make a syscall that will set errno unless you suppress this behavior -- munmap can