_BSD_SOURCE and _GNU_SOURCE

Aleix Pol aleixpol at kde.org
Fri Nov 14 16:36:10 GMT 2014


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.

Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20141114/7a8c6f0c/attachment.htm>


More information about the kde-core-devel mailing list