diff options
author | michaels <michaels@cvs.openbsd.org> | 1996-07-17 05:42:29 +0000 |
---|---|---|
committer | michaels <michaels@cvs.openbsd.org> | 1996-07-17 05:42:29 +0000 |
commit | 7d4d715b7f9569f0d52a0115009940edf4ef542d (patch) | |
tree | ed99731faa9520950d8806dfbc150ce8d53f8566 /gnu | |
parent | abf07a9855d9d384c09449f789264fbe0d565863 (diff) |
Need to have "HAVE_UNISTD_H" defined to get the prototype for read(),
otherwise "~/.inputrc" will not be read by gdb.
Added prototypes to the declaration of xmalloc() and xrealloc(),
included "ansidecl.h". Since we now actually read ~/.inputrc we should
also correcly allocate memory for the buffer.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gdb/readline/Makefile | 5 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/readline/readline.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gnu/usr.bin/gdb/readline/Makefile b/gnu/usr.bin/gdb/readline/Makefile index 85985d69a9a..d129a7552f5 100644 --- a/gnu/usr.bin/gdb/readline/Makefile +++ b/gnu/usr.bin/gdb/readline/Makefile @@ -1,10 +1,11 @@ -# $Id: Makefile,v 1.1 1995/10/18 08:40:14 deraadt Exp $ +# $Id: Makefile,v 1.2 1996/07/17 05:42:26 michaels Exp $ LIB= readline NOPROFILE= NOPIC= -CFLAGS+= -DVOID_SIGHANDLER -DVI_MODE +CFLAGS+= -DVOID_SIGHANDLER -DVI_MODE -DHAVE_UNISTD_H \ + -I$(.CURDIR)/../include/ SRCS= funmap.c history.c keymaps.c readline.c vi_mode.c tilde.c install: diff --git a/gnu/usr.bin/gdb/readline/readline.c b/gnu/usr.bin/gdb/readline/readline.c index 1446c416f89..2813a89cb80 100644 --- a/gnu/usr.bin/gdb/readline/readline.c +++ b/gnu/usr.bin/gdb/readline/readline.c @@ -21,13 +21,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: readline.c,v 1.1 1995/10/18 08:40:15 deraadt Exp $ + $Id: readline.c,v 1.2 1996/07/17 05:42:28 michaels Exp $ */ +#include "ansidecl.h" +/* needed here for PTR */ + /* Remove these declarations when we have a complete libgnu.a. */ /* #define STATIC_MALLOC */ #if !defined (STATIC_MALLOC) -extern char *xmalloc (), *xrealloc (); +extern char *xmalloc (long), *xrealloc (PTR, long); #else static char *xmalloc (), *xrealloc (); #endif /* STATIC_MALLOC */ @@ -40,6 +43,7 @@ static char *xmalloc (), *xrealloc (); #endif #include <signal.h> + #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif |