[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: should asprintf and friends guarantee sane pointer on failure?
From: |
Bruno Haible |
Subject: |
Re: should asprintf and friends guarantee sane pointer on failure? |
Date: |
Mon, 29 Jul 2024 17:23:45 +0200 |
Eric Blake wrote:
> On the other hand, if glibc DOES decide to do (b) to match BSD, then
> why would gnulib NOT want to guarantee the same portably across all
> platforms?
Because what matters is the standards; POSIX in this case.
glibc and BSD are not the only platforms. Other platforms that have vasprintf
are macOS, Solaris, Cygwin, Android. It would be hard to argue that
Gnulib should override vasprintf on some of these platforms, for a
change that glibc has adopted for the sake of crappy programs.
As usual, we can have a *-gnu variant of the modules. The question is
whether such a change in behaviour is worth all the implementation effort.
Bruno