This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Remove __FAVOR_BSD
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Michael Kerrisk <mtk dot manpages at gmail dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, <libc-alpha at sourceware dot org>
- Date: Mon, 6 Jan 2014 14:08:58 +0000
- Subject: Re: Remove __FAVOR_BSD
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1312052315530 dot 16480 at digraph dot polyomino dot org dot uk> <20131216225338 dot 6FA7E7442E at topped-with-meat dot com> <Pine dot LNX dot 4 dot 64 dot 1312171726260 dot 14559 at digraph dot polyomino dot org dot uk> <20131217175318 dot AC4B674423 at topped-with-meat dot com> <Pine dot LNX dot 4 dot 64 dot 1312171808520 dot 14559 at digraph dot polyomino dot org dot uk> <CALxWeYoeTXG0uP-RPJdyU-kGBBOjQ5agT+GA4D0NRSKgHcvpNQ at mail dot gmail dot com>
On Mon, 6 Jan 2014, Michael Kerrisk wrote:
> First of all, would this revised test for the feature_test_macros(7)
> page be correct:
>
> _BSD_SOURCE
> Defining this macro with any value causes header files
> to expose BSD-derived definitions. In glibc versions up
> to and including 2.18, defining this macro also causes
> BSD definitions to be preferred in some situations where
> standards conflict, unless one or more of _SVID_SOURCE,
> _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE,
> _XOPEN_SOURCE_EXTENDED, or _GNU_SOURCE is defined, in
> which case BSD definitions are disfavored. Since glibc
> 2.19, _BSD_SOURCE no longer causes BSD definitions to be
> preferred in case of conflicts.
Yes.
> What do (admittedly, strange) programs that employ the BSD getpgrp()
> and setpgrp() interfaces now do? It looks as though they'll require
> source code changes to call a different API, right?
Yes. Programs using BSD getpgrp, setpgrp, setjmp and sigpause will need
source code changes.
--
Joseph S. Myers
joseph@codesourcery.com