This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Declare reallocarray by default


On Thu, 30 Aug 2018, Florian Weimer wrote:

> > This seems reasonable to me. The choice of __USE_GNU was perhaps a
> > conservative one since it requires _GNU_SOURCE to be defined on the
> > user side and that enables a lot of extensions. Relaxing reallocarray
> > to __USE_MISC is a good choice if we are seeing developer problems
> > with this e.g. reallocarray is detected in some way at runtime, but
> > with the prototype missing (and compiler warnings ignored), and the
> > default signature resulting in pointer truncation (int). It's also
> > a good choice because the BSDs already have it.
> 
> Joseph, do you have any comment on this?

No.  The choice of whether something is included in _DEFAULT_SOURCE is a 
pragmatic one, since it's no longer defined based on a particular set of 
external APIs.  (Of course C++ code still gets _GNU_SOURCE whether it 
wants it or not, until we figure out how to allow libstdc++ to get 
everything its headers need under reserved names.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]