From: letoh Date: Mon, 12 Mar 2018 14:25:58 +0000 (+0800) Subject: Fixes #40: add _DEFAULT_SOURCE back for Linux build X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/b5dd084c62470a0356f898b66888565429c59717 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. --- 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)