From: John Gilmore Date: Sat, 9 Nov 1991 11:24:36 +0000 (+0000) Subject: * configure.in: Make a link for sysdep.h. Specify commontargets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f4a039a2195bbfcf3ae1f9af8069c640d6c8a88;p=binutils-gdb.git * configure.in: Make a link for sysdep.h. Specify commontargets. * sysdep-norm.h: The usual alloca declarations. * sysdep-aix.h: What AIX 3.1 on RS/6000 needs for alloca. * history.c, readline.c: Use sysdep.h. --- diff --git a/readline/ChangeLog b/readline/ChangeLog index ac4b5040332..38d7f2efe35 100644 --- a/readline/ChangeLog +++ b/readline/ChangeLog @@ -1,3 +1,10 @@ +Sat Nov 9 03:19:40 1991 John Gilmore (gnu at cygnus.com) + + * configure.in: Make a link for sysdep.h. Specify commontargets. + * sysdep-norm.h: The usual alloca declarations. + * sysdep-aix.h: What AIX 3.1 on RS/6000 needs for alloca. + * history.c, readline.c: Use sysdep.h. + Thu Oct 24 21:58:46 1991 John Gilmore (gnu at cygnus.com) * configure.in: aix is a Sys V as far as we're concerned. diff --git a/readline/configure.in b/readline/configure.in index f7b80da238d..4006e70accc 100644 --- a/readline/configure.in +++ b/readline/configure.in @@ -6,12 +6,24 @@ configdirs= srctrigger=readline.c srcname="the readline library" +commontargets=true # per-host: +files=sysdep-norm.h +links=sysdep.h + case "${host_os}" in -sysv* | irix* | aix*) host_makefile_frag=config/hm-sysv ;; +m88kbcs | sysv* | irix*) + host_makefile_frag=config/hm-sysv + ;; + +aix*) + host_makefile_frag=config/hm-sysv + case "${host_arch}" in + rs6000) files=sysdep-aix.h + esac + ;; esac # per-target: - diff --git a/readline/readline.c b/readline/readline.c index b05a7c97e5b..5238bcf6080 100644 --- a/readline/readline.c +++ b/readline/readline.c @@ -36,13 +36,7 @@ static char *xmalloc (), *xrealloc (); #include #include -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else -#if defined (sparc) && defined (sun) -#include -#endif -#endif +#include "sysdep.h" #define NEW_TTY_DRIVER #if defined (SYSV) || defined (hpux) || defined (Xenix) @@ -1503,7 +1497,7 @@ update_line (old, new, current_line) wsatend = 1; /* flag for trailing whitespace */ ols = oe - 1; /* find last same */ nls = ne - 1; - while ((*ols == *nls) && (ols > ofd) && (nls > nfd)) + while ((ols > ofd) && (nls > nfd) && (*ols == *nls)) { if (*ols != ' ') wsatend = 0; @@ -1839,8 +1833,7 @@ init_terminal_io (terminal_name) return; } - BC = tgetstr ("pc", &buffer); - PC = buffer ? *buffer : 0; + PC = tgetstr ("pc", &buffer)? *buffer : 0; term_backspace = tgetstr ("le", &buffer);