Add CFLAGS for compiling on OS/X
authorBill Lash <william.lash@gmail.com>
Wed, 30 Jan 2019 23:20:37 +0000 (17:20 -0600)
committerBill Lash <william.lash@gmail.com>
Wed, 30 Jan 2019 23:20:37 +0000 (17:20 -0600)
Added (commented out_ CFLAGS to enable compilation on MAC OSX.  Also
added a short paragraph to the INSTALL with a pointer to the Makefile

INSTALL
Makefile

diff --git a/INSTALL b/INSTALL
index b65bf3d058efd0d026f604f66445cd8846cd2f80..15179908b95dd131f29a38d5fc8993b2d358a5a9 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -36,6 +36,9 @@ curses.  You can download ncurses from ftp://ftp.gnu/org/gnu/ncurses/.
 If you insist on using the vendor-supplied curses library, see the
 platform-specific info below.
 
+For MAC OS/X users, check the Makefile, and uncomment the line that
+adds the "-D_DARWIN_SOURCE" and "-D_XOPEN_SOURCE=600" CFLAGS.
+
 It's always a good idea to have the GNU version of make(1) around.
 
 
index ea7edab68ae271fb165e8263d57d61e01b0686bc..bdfdb320cf671104dc2612f19a3d0e0f7cf40fb8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@ CC=gcc
 # Enable compiler warnings. This is an absolute minimum.
 CFLAGS += -Wall -std=c99 #-Wextra
 
+# If compiling on OS/X add the following
+# CFLAGS += -D_DARWIN_C_SOURCE -_XOPEN_SOURCE=600
+
 # strdup, strndup
 CFLAGS += -D_POSIX_C_SOURCE=200809L