Bruno Haible <br...@clisp.org> writes: > Simon Josefsson wrote: >> What about a realloc-gnu which implements a behaviour we think it is >> useful? I know that we used -gnu for modules that are glibc extensions >> over POSIX > > Yes, the two standards to which gnulib leans are POSIX and glibc's behaviour. > >> but I think we could extend it to be just any extension over >> POSIX. Alternatively, use realloc-gnulib? > > Then we can call it zrealloc or wrealloc or like that. It's better to use > a different name when we create a function which is an invention of our own; > otherwise users get confused.
Right, I agree. > Now, regarding realloc specifically, what is the significant extension of > POSIX that you would propose that makes it worth documenting for us and > worth reading this documentation for the user? I think you will end up > with either 'xrealloc' or 'REALLOC-N' from the safe-alloc module... I agree. Or even, use realloc as if it were POSIX. It's not that complicated, is it? That seems more robust anyway. People reading code that uses realloc and the code assumes non-POSIX behaviour are going to be surprised if gnulib does anything extra here. /Simon