Re: realloc: Improve documentation

2024-10-19 Thread Bruno Haible via Gnulib discussion list
Alejandro Colomar wrote: > > +(on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, Solaris, Cygwin). > > Are you sure OpenBSD is on this list? Yes. 1. I checked it on OpenBSD 7.6, with the program that I attached. 2. It is consistent with the experiment that I had done in 2011: https://sourceware.org/

Re: realloc: Improve documentation

2024-10-19 Thread Alejandro Colomar
On Sat, Oct 19, 2024 at 02:23:44PM GMT, Paul Eggert wrote: > Thanks. Some further improvements: > > * Document whether realloc can fail when not growing a region. > > * Mention what happens to errno. > > * Mention how the ISO C standard has evolved here. > > * Give more details as to which glib

Re: realloc: Improve documentation

2024-10-19 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote: > Thanks. Some further improvements: > > * Document whether realloc can fail when not growing a region. > > * Mention what happens to errno. > > * Mention how the ISO C standard has evolved here. > > * Give more details as to which glibc versions do what. > > * In the "pract

Re: realloc: Improve documentation

2024-10-19 Thread Bruno Haible via Gnulib discussion list
Alejandro Colomar wrote: > > >(C) usually succeeds and returns a unique zero-size object. > > >And there is also > > >(D) usually succeeds and returns a pointer to freshly-allocated > > > memory > > >of 1 byte. > > I'm not entirely sure what you mean by C and D. I

Re: realloc: Improve documentation

2024-10-19 Thread Paul Eggert
alloc (p, 0) + * doc/posix-functions/realloc.texi (realloc): + Document more realloc (p, 0) gotchas: evolution of C standards, + errno values, which glibc versions do what, how programs might + misbehave, what happens when not growing. + 2024-10-19 Bruno Haible realloc: Improve documentation. di

Re: realloc: Improve documentation

2024-10-19 Thread Alejandro Colomar
possibility in > >doc/posix-functions/realloc.texi.) > > Done as follows: > > > 2024-10-19 Bruno Haible > > realloc: Improve documentation. > * doc/posix-functions/realloc.texi: Regarding realloc(p,0), document > what the platforms a

realloc: Improve documentation

2024-10-19 Thread Bruno Haible via Gnulib discussion list
-allocated memory >of 1 byte. >(I believe we should mention this fourth possibility in >doc/posix-functions/realloc.texi.) Done as follows: 2024-10-19 Bruno Haible realloc: Improve documentation. * doc/posix-functions/realloc.texi: Regarding realloc