Subject: Re: ld --as-needed broken ?
To: Luke Mewburn <lukem@NetBSD.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-toolchain
Date: 05/16/2005 16:51:35
--5QAgd0e35j3NYeGe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Re adding a libedit -> libtermcap dependency and publishing the
completion_matches function, I missed the .WAIT magic in the Makefile
above - I also think the .WAIT before libpam and libssh are superfluous...
So the complete patch should now be attached.

Cheers,

Patrick

--5QAgd0e35j3NYeGe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=editpat

Index: Makefile
===================================================================
RCS file: /cvsroot/src/lib/Makefile,v
retrieving revision 1.95
diff -u -r1.95 Makefile
--- Makefile	20 Feb 2005 00:52:02 -0000	1.95
+++ Makefile	16 May 2005 15:30:21 -0000
@@ -4,7 +4,7 @@
 .include <bsd.own.mk>
 
 SUBDIR=	csu libc .WAIT libarch libbsdmalloc libbz2 libcompat libcrypt \
-	libcurses libedit libevent libform libintl libkvm libl libm libmagic \
+	libcurses libevent libform libintl libkvm libl libm libmagic \
 	libmenu libossaudio libpcap libpci libpmc libposix libpthread \
 	libpthread_dbg libradius libresolv librmt librpcsvc librt libterm \
 	libusbhid libutil libwrap liby libz
@@ -58,7 +58,7 @@
 # (and those that depend upon these [and ...])
 #
 SUBDIR+=	.WAIT
-SUBDIR+=	libcdk 
+SUBDIR+=	libcdk libedit
 .if (${MKCRYPTO} != "no")
 SUBDIR+=	libssl
 .endif
@@ -70,11 +70,11 @@
 .endif
 
 .if (${MKCRYPTO} != "no")
-SUBDIR+=	.WAIT libssh
+SUBDIR+=	libssh
 .endif
 
 .if (${MKPAM} != "no")
-SUBDIR+=	.WAIT libpam
+SUBDIR+=	libpam
 .endif
 
 .include <bsd.subdir.mk>
Index: Makefile
===================================================================
RCS file: /cvsroot/src/lib/libedit/Makefile,v
retrieving revision 1.31
diff -u -r1.31 Makefile
--- Makefile	7 May 2005 16:22:59 -0000	1.31
+++ Makefile	13 May 2005 15:04:23 -0000
@@ -6,6 +6,8 @@
 WARNS=	3
 LIB=	edit
 
+LIBDPLIBS=	termcap	${.CURDIR}/../libterm
+
 OSRCS=	chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c hist.c \
 	key.c map.c \
 	parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
Index: filecomplete.c
===================================================================
RCS file: /cvsroot/src/lib/libedit/filecomplete.c,v
retrieving revision 1.4
diff -u -r1.4 filecomplete.c
--- filecomplete.c	12 May 2005 15:48:40 -0000	1.4
+++ filecomplete.c	13 May 2005 15:04:23 -0000
@@ -261,7 +261,7 @@
 /*
  * returns list of completions for text given
  */
-static char **
+char **
 completion_matches(const char *text, char *(*genfunc)(const char *, int))
 {
 	char **match_list = NULL, *retstr, *prevstr;
Index: filecomplete.h
===================================================================
RCS file: /cvsroot/src/lib/libedit/filecomplete.h,v
retrieving revision 1.2
diff -u -r1.2 filecomplete.h
--- filecomplete.h	7 May 2005 16:28:32 -0000	1.2
+++ filecomplete.h	13 May 2005 15:04:23 -0000
@@ -47,5 +47,8 @@
 void fn_display_match_list(EditLine *, char **, int, int);
 char *tilde_expand(char *txt);
 char *filename_completion_function(const char *, int);
+/* from/for readline */
+typedef char *CPFunction(const char *, int);
+char **completion_matches(const char *, CPFunction *);
 
 #endif

--5QAgd0e35j3NYeGe--