Skip to content

Commit

Permalink
Define feature macros only on Linux
Browse files Browse the repository at this point in the history
In preparation for the BSD support.

See also my relevant pull request to the termbox-next at:
nullgemm/termbox_next#1
  • Loading branch information
liweitianux committed Oct 5, 2018
1 parent 51fb790 commit 70cef77
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ CC=gcc
#CC=tcc
FLAGS=-std=c99 -pedantic -Wall -Werror=vla -Werror -g

OS:=$(shell uname -s)
ifeq ($(OS),Linux)
FLAGS+=-D_DEFAULT_SOURCE
endif

BIND=bin
SRCD=src
SUBD=sub
Expand Down
1 change: 0 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 700
#include "config.h"
#include "cylgom.h"
#include "ini.h"
Expand Down
1 change: 0 additions & 1 deletion src/desktop.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 700
#include "desktop.h"
#include "cylgom.h"
#include "ini.h"
Expand Down
1 change: 0 additions & 1 deletion src/draw.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 700
#include "draw.h"
#include "cylgom.h"
#include "termbox.h"
Expand Down
3 changes: 0 additions & 3 deletions src/login.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#define _XOPEN_SOURCE 700
#define _DEFAULT_SOURCE

#include "config.h"
#include "login.h"
#include "widgets.h"
Expand Down
1 change: 0 additions & 1 deletion src/util.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 700
#include "util.h"
#include "config.h"
#include "widgets.h"
Expand Down
1 change: 0 additions & 1 deletion src/widgets.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 700
#include "widgets.h"
#include "cylgom.h"
#include <string.h>
Expand Down

0 comments on commit 70cef77

Please sign in to comment.