attached is a patch to address these issues with rlfe:
 - trying to build rlfe on uClibc fails because it lacks sys/stropts.h
 - pty.c uses close() but doesnt include <unistd.h>
 - rlfe.c uses OpenPTY() but doesnt include "extern.h"
 - rlfe.c uses wait() but doesnt include <sys/wait.h>
 - rlfe/configure sets up LIBS but Makefile.in ignores it (breaks on bsd due 
to -lutil not being linked in properly)
-mike
--- readline-5.1/examples/rlfe/Makefile.in
+++ readline-5.1/examples/rlfe/Makefile.in
@@ -25,7 +25,7 @@ CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
 #LDFLAGS = -L$(READLINE_DIR)
 LDFLAGS = @LDFLAGS@
-LIBS = -lreadline -lhistory -lncurses
+LIBS = -lreadline -lhistory @LIBS@
 
 [EMAIL PROTECTED]@
 CPP_DEPEND=$(CC) -MM
--- readline-5.1/examples/rlfe/configure.in
+++ readline-5.1/examples/rlfe/configure.in
@@ -435,4 +435,6 @@
 
 fi
 
+AC_CHECK_HEADERS(sys/stropts.h sys/wait.h)
+
 AC_OUTPUT(Makefile)
--- readline-5.1/examples/rlfe/pty.c
+++ readline-5.1/examples/rlfe/pty.c
@@ -23,6 +23,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <unistd.h>
 #include <fcntl.h>
 #include <signal.h>
 
@@ -34,7 +35,7 @@
 #endif
 
 /* for solaris 2.1, Unixware (SVR4.2) and possibly others */
-#ifdef HAVE_SVR4_PTYS
+#if defined(HAVE_SYS_STROPTS_H)
 # include <sys/stropts.h>
 #endif
 
--- readline-5.1/examples/rlfe/rlfe.c
+++ readline-5.1/examples/rlfe/rlfe.c
@@ -73,6 +73,11 @@
 #include <termios.h>
 
 #include "config.h"
+#include "extern.h"
+
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
 
 #ifdef READLINE_LIBRARY
 #  include "readline.h"
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to