mheily / jobd

A job management framework
Other
143 stars 15 forks source link

Compilation warnings: _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE #16

Closed sgerbino closed 8 years ago

sgerbino commented 8 years ago

Using the following environment:

[sgerbino@elysium relaunchd]$ gcc --version
gcc (GCC) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[sgerbino@elysium relaunchd]$ uname -a
Linux elysium 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux
[sgerbino@elysium relaunchd]$ 

Building the project produces the following warnings:

[sgerbino@elysium relaunchd]$ make
echo "/* Automatically generated -- do not edit */" > config.h
printf '#define HAVE_SYS_LIMITS_H ' >> config.h
echo '#include <sys/limits.h>' | cc -std=c99 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE -I/usr/include/kqueue/ -x c -o /dev/null -c - 2>/dev/null; \
    echo "$? == 0" | bc >> config.h
echo "#define CACHEDIR \"/var/cache/launchd\"" >> config.h
test -d /var/db && statedir=/var/db/launchd || statedir=/var/lib/launchd ; \
    echo "#define PKGSTATEDIR \"$statedir\"" >> config.h
cc -include config.h -std=c99 -std=c99 -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE -I/usr/include/kqueue/ -lkqueue -lpthread -lucl -o launchd job.c log.c launchd.c manager.c manifest.c socket.c timer.c pidfile.c flopen.c
In file included from /usr/include/fcntl.h:25:0,
                 from job.c:17:
/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"
   ^
In file included from /usr/include/stdlib.h:24:0,
                 from log.c:17:
/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"
   ^
In file included from /usr/include/dirent.h:25:0,
                 from launchd.c:17:
/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"
   ^
In file included from /usr/include/sys/cdefs.h:23:0,
                 from vendor/FreeBSD/sys/queue.h:36,
                 from manager.c:17:
/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"
   ^
In file included from /usr/include/string.h:25:0,
                 from /usr/include/ucl.h:27,
                 from manifest.c:17:
/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"
   ^
In file included from /usr/include/fcntl.h:25:0,
                 from socket.c:17:
/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"
   ^
In file included from /usr/include/sys/cdefs.h:23:0,
                 from vendor/FreeBSD/sys/queue.h:36,
                 from timer.c:17:
/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"
   ^
In file included from /usr/include/sys/cdefs.h:23:0,
                 from pidfile.c:27:
/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"
   ^
In file included from /usr/include/sys/cdefs.h:23:0,
                 from flopen.c:28:
/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"
   ^