Skip to content

Commit

Permalink
include: define _DEFAULT_SOURCE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
0intro committed Nov 20, 2016
1 parent 1b68dbe commit 657f699
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/u.h
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/cmd/grap/main.c
@@ -1,4 +1,5 @@
#define _BSD_SOURCE 1 /* strdup, mkstemp */
#define _DEFAULT_SOURCE 1
#include <stdio.h>
#include <signal.h>
#include <math.h>
Expand Down
1 change: 1 addition & 0 deletions src/cmd/rio/menu.c
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/cmd/troff/n2.c
Expand Up @@ -5,6 +5,7 @@
*/

#define _BSD_SOURCE 1 /* popen */
#define _DEFAULT_SOURCE 1
#include "tdef.h"
#include "fns.h"
#include "ext.h"
Expand Down
1 change: 1 addition & 0 deletions src/cmd/troff/n7.c
@@ -1,4 +1,5 @@
#define _BSD_SOURCE 1 /* isascii */
#define _DEFAULT_SOURCE 1
#include "tdef.h"
#include "fns.h"
#include "ext.h"
Expand Down
1 change: 1 addition & 0 deletions src/lib9/utf/utfecpy.c
Expand Up @@ -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"
Expand Down

0 comments on commit 657f699

Please sign in to comment.