_BSD_SOURCE and _GNU_SOURCE
Matthias Klumpp
matthias at tenstral.net
Fri Nov 14 16:51:14 GMT 2014
2014-11-14 17:36 GMT+01:00 Aleix Pol <aleixpol at kde.org>:
> On Fri, Nov 14, 2014 at 4:23 PM, Milian Wolff <mail at milianw.de> wrote:
>>
>> Hello all.
>>
>> Since recently I get spammed by warnings such as this one:
>>
>>
>> /ssd/milian/projects/kde4/kdelibs/kdecore/network/klocalsocket_unix.cpp:22:
>> /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and
>> _SVID_SOURCE
>> are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>> # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
>> _DEFAULT_SOURCE"
>>
>> Why do we defined _BSD_SOURCE or _GNU_SOURCE in FindKDE4Internal.cmake?
>
> It's explained in kde-modules/KDECompilerSettings.cmake:
>
> # Enable everything in GNU libc. Any code using non-portable features
> # needs to perform feature tests, but this ensures that any such features
> # will be found if they exist.
>
> I agree it should be revisited or something, especially if those are
> deprecated now in favor of _DEFAULT_SOURCE.
Only adding _GNU_SOURCE should yield the expected behaviour...
Or the projects could set this individually, if they need functions
exposed by it (although removing it shortly might break assumptions in
some programs which rely on GNU-ish behaviour of system functions, so
that would be a bad idea).
Regards,
Matthias
--
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/
More information about the kde-core-devel
mailing list