Subject: NetBSD+readline stairstep woes - fixed
To: None <bug-gnu-utils@prep.ai.mit.edu, current-users@NetBSD.ORG, scottr@plexus.com,>
From: VaX#n8 <vax@linkdead.paranoia.com>
List: current-users
Date: 09/28/1996 02:52:31
explanation: NEW_TTY_DRIVER is not the newest...
POSIX termios is, which NetBSD claims to be
But NetBSD still needs the tputs of the carriage return
Modernized the gcc/ld args, fixed a header inst problem
compensated for stupid ash (NetBSD's /bin/sh) bug
Index: Makefile.in
===================================================================
RCS file: /usr/local/share/cvsroot/readline/Makefile.in,v
retrieving revision 1.1.1.1
retrieving revision 1.5
diff -u -r1.1.1.1 -r1.5
--- Makefile.in	1996/03/30 20:44:53	1.1.1.1
+++ Makefile.in	1996/09/28 07:36:04	1.5
@@ -22,6 +22,7 @@
 exec_prefix = $(prefix)
 bindir = $(exec_prefix)/bin
 libdir = $(exec_prefix)/lib
+incdir = $(prefix)/include
 mandir = $(prefix)/man/man1
 
 SHELL = /bin/sh
@@ -45,8 +46,8 @@
 
 CPPFLAGS = $(DEFS) $(INCLUDES)
 
-PICFLAG=        -pic    # -fpic for some versions of gcc
-SHLIB_OPTS=	-assert pure-text -ldl	# -Bshareable for some versions of gcc
+PICFLAG=        -pic -fpic -fPIC  # if you specify all gcc won't bomb out
+SHLIB_OPTS=	-assert pure-text -Bshareable
 MAJOR=		2
 MINOR=		.0
 
@@ -78,7 +79,7 @@
 HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h \
 	   posixstat.h tilde.h rlconf.h
 
-INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h
+INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h
 
 OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
 	  rltty.o complete.o bind.o isearch.o display.o signals.o \
@@ -136,9 +137,9 @@
 	-$(RANLIB) -t $(libdir)/libreadline.a
 
 installdirs:
-	[ ! -d $(incdir)/readline ] && { \
+	-[ ! -d $(incdir)/readline ] && { \
 	  mkdir $(incdir)/readline && chmod 755 $(incdir)/readline; }
-	[ ! -d $(libdir) ] && mkdir $(libdir)
+	-[ ! -d $(libdir) ] && mkdir $(libdir)
 
 uninstall:
 	[ -n "$(incdir)" ] && cd $(incdir)/readline && \
Index: readline.c
===================================================================
RCS file: /usr/local/share/cvsroot/readline/readline.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- readline.c	1996/03/30 20:44:55	1.1.1.1
+++ readline.c	1996/09/28 07:36:06	1.2
@@ -1519,7 +1519,8 @@
 /* Move to the start of the next line. */
 crlf ()
 {
-#if defined (NEW_TTY_DRIVER)
+/* NetBSD needs this, guess it's not completely POSIXized yet */
+#if defined (NEW_TTY_DRIVER) || defined(__NetBSD__)
   tputs (term_cr, 1, _rl_output_character_function);
 #endif /* NEW_TTY_DRIVER */
   putc ('\n', out_stream);