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: [RFC PATCH] Deprecate _REENTRANT and _THREAD_SAFE.


On 06 Dec 2016 11:48, Zack Weinberg wrote:
> On 12/06/2016 11:46 AM, Joseph Myers wrote:
> > On Tue, 6 Dec 2016, Zack Weinberg wrote:
> >> -D_REENTRANT all by itself also won't, because _DEFAULT_SOURCE implies
> >> _POSIX_C_SOURCE > 199506.  I could be persuaded to make that final
> >> case also warn.
> > 
> > Given that GCC specs include %{pthread:-D_REENTRANT} (in many 
> > architecture-specific specs), and that -pthread is (approximately) an 
> > OS-independent way of saying to add whatever compiler and linker options 
> > are needed for threads, I'd discourage warning in that case.
> 
> Yeah, that's plenty good enough reason not to warn.

another data point: these defines are used beyond glibc, so if we were to
make it annoying for people to rely on them, it'd just make people trying
to support multiple OS's difficult for no gain.  here's one project where,
because gcc *wasn't* setting up these defines in their specs, the program
failed to build correctly for some targets:
	https://bugs.gentoo.org/543114
-mike

Attachment: signature.asc
Description: Digital signature


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