summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-09 06:57:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-09 06:57:07 -0700
commitc6c05649f5d3890281e6fe95694794d39f6f0841 (patch)
tree670470fb28f3eadc43006019e04d6847555ca1f4 /Makefile
parent6e8cecf1f958af3b46365b8f41ceea500d9f2019 (diff)
downloadtxr-c6c05649f5d3890281e6fe95694794d39f6f0841.tar.gz
txr-c6c05649f5d3890281e6fe95694794d39f6f0841.tar.bz2
txr-c6c05649f5d3890281e6fe95694794d39f6f0841.zip
Reveal struct winsize on Solaris.
On Solaris 10, we need __EXTENSIONS__ defined to make struct winsize appear out of <termios.h>. This commit adds detection for what preprocessor symbol needs to be defined for struct winsize to appear, if it appears at all. Then this symbol is defined on the compiler command line when compiling linenoise. * Makefile (CFLAGS): Add -D$(termios_define) for linenoise.o target. * configure (have_winsize, termios_define): New variables. Detect whether struct winsize is available, and what preprocessor symbol, if any, is required to reveal the feature. * linenoise/linenoise.c: Need to include TXR's "config.h" for HAVE_WINSIZE. (get_columns): Reorganized so that use of struct winsize is guarded by HAVE_WINSIZE and fallback code is used if either obtaining the size fails or the feature is completely unavailable.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c05ecb75..bc0b488e 100644
--- a/Makefile
+++ b/Makefile
@@ -233,6 +233,7 @@ dbg/txr-win.o: CFLAGS += -DPROG_NAME=\"$(PROG)-win-dbg\" \
$(call EACH_CONF,txr.o txr-win.o): CFLAGS += -DEXE_SUFF=\"$(EXE)\"
$(call EACH_CONF,txr.o txr-win.o): CFLAGS += -DTXR_VER=\"$(txr_ver)\"
+$(call EACH_CONF,linenoise/linenoise.o): CFLAGS += -D$(termios_define)
.PHONY: rebuild clean repatch distclean
ifeq ($(PROG),)