diff options
author | Carlos O'Donell <carlos@redhat.com> | 2014-02-25 13:23:25 -0500 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2014-02-25 13:23:25 -0500 |
commit | ade40b10ff5fa59a318cf55b9d8414b758e8df78 (patch) | |
tree | 599c080add2a6060c32f97d8e2c8c47318b7fb4e /include | |
parent | d050367659e04685a0eab910e86ea6829a8d24f9 (diff) | |
download | glibc-ade40b10ff5fa59a318cf55b9d8414b758e8df78.tar.gz glibc-ade40b10ff5fa59a318cf55b9d8414b758e8df78.tar.xz glibc-ade40b10ff5fa59a318cf55b9d8414b758e8df78.zip |
BZ #16632: Change [_BSD/_SVID]_SOURCE warning.
Source packages that need to support both 2.19 and 2.20 will need to decide to use _BSD_SOURCE and _SVID_SOURCE vs. _DEFAULT_SOURCE. The difficulty in making that decision is that __GLIBC_MINOR__ is itself defined in features.h, but you want to set the feature test macros before including features.h. Therefore to ease the transition we should disable the warning if _DEFAULT_SOURCE is also defined. https://sourceware.org/ml/libc-alpha/2014-02/msg00666.html https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes
Diffstat (limited to 'include')
-rw-r--r-- | include/features.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/features.h b/include/features.h index 75237a7984..c3ed81fa19 100644 --- a/include/features.h +++ b/include/features.h @@ -140,8 +140,11 @@ #endif /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for - _DEFAULT_SOURCE. */ -#if defined _BSD_SOURCE || defined _SVID_SOURCE + _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not + issue a warning; the expectation is that the source is being + transitioned to use the new macro. */ +#if (defined _BSD_SOURCE || defined _SVID_SOURCE) \ + && !defined _DEFAULT_SOURCE # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" # undef _DEFAULT_SOURCE # define _DEFAULT_SOURCE 1 |