From b5dd084c62470a0356f898b66888565429c59717 Mon Sep 17 00:00:00 2001 From: letoh Date: Mon, 12 Mar 2018 22:25:58 +0800 Subject: [PATCH] Fixes #40: add _DEFAULT_SOURCE back for Linux build This commit fixes the improper patch in the pull request #7. When building pforth on the Linux system with glibc version before 2.19, defining _GNU_SOURCE is needed for using ECHOCTL in the source. However, the later version of glibc uses _DEFAULT_SOURCE instead of _GNU_SOURCE for the same purpose, we will need both symbols for both older glibc and newer glibc. --- build/unix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/unix/Makefile b/build/unix/Makefile index 3e9f3e7..e80b56d 100644 --- a/build/unix/Makefile +++ b/build/unix/Makefile @@ -58,7 +58,7 @@ PFSOURCE = $(PFBASESOURCE) $(IO_SOURCE) VPATH = .:$(CSRCDIR):$(CSRCDIR)/posix:$(CSRCDIR)/stdio:$(CSRCDIR)/win32_console:$(CSRCDIR)/win32 XCFLAGS = $(CCOPTS) -XCPPFLAGS = -DPF_SUPPORT_FP -D_GNU_SOURCE +XCPPFLAGS = -DPF_SUPPORT_FP -D_DEFAULT_SOURCE -D_GNU_SOURCE XLDFLAGS = $(WIDTHOPT) CPPFLAGS = -I. $(XCPPFLAGS) -- 2.20.1