include: define _DEFAULT_SOURCE

Since glibc 2.20, the _BSD_SOURCE and _SVID_SOURCE macros are
deprecated in favor of the _DEFAULT_SOURCE macro.

See https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes

Change-Id: I18dd6a698f3f5aa51d1e45bf53b031bb061e17e8
Reviewed-on: https://plan9port-review.googlesource.com/1500
Reviewed-by: David du Colombier <0intro@gmail.com>
This commit is contained in:
David du Colombier 2016-05-07 17:36:32 +02:00
parent 1b68dbef7b
commit 657f699ef7
6 changed files with 6 additions and 0 deletions

View file

@ -19,6 +19,7 @@ extern "C" {
#define _BSD_SOURCE 1
#define _NETBSD_SOURCE 1 /* NetBSD */
#define _SVID_SOURCE 1
#define _DEFAULT_SOURCE 1
#if !defined(__APPLE__) && !defined(__OpenBSD__)
# define _XOPEN_SOURCE 1000
# define _XOPEN_SOURCE_EXTENDED 1

View file

@ -1,4 +1,5 @@
#define _BSD_SOURCE 1 /* strdup, mkstemp */
#define _DEFAULT_SOURCE 1
#include <stdio.h>
#include <signal.h>
#include <math.h>

View file

@ -4,6 +4,7 @@
/* Copyright (c) 1994-1996 David Hogan, see README for licence details */
#define _SVID_SOURCE 1 /* putenv in glibc */
#define _DEFAULT_SOURCE 1
#include <stdio.h>
#include <signal.h>
#include <unistd.h>

View file

@ -5,6 +5,7 @@
*/
#define _BSD_SOURCE 1 /* popen */
#define _DEFAULT_SOURCE 1
#include "tdef.h"
#include "fns.h"
#include "ext.h"

View file

@ -1,4 +1,5 @@
#define _BSD_SOURCE 1 /* isascii */
#define _DEFAULT_SOURCE 1
#include "tdef.h"
#include "fns.h"
#include "ext.h"

View file

@ -12,6 +12,7 @@
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*/
#define _BSD_SOURCE 1 /* memccpy */
#define _DEFAULT_SOURCE 1
#include <stdarg.h>
#include <string.h>
#include "plan9.h"