summaryrefslogtreecommitdiff
path: root/cmd-line-utils/libedit/readline.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-02-27 03:44:44 +0200
committerunknown <monty@narttu.mysql.fi>2003-02-27 03:44:44 +0200
commit669cbe6e5fffb715e117a96273db9c95e229b3a9 (patch)
treee734507eb0df4722e03a80a37b7b9a4c53728c3e /cmd-line-utils/libedit/readline.c
parenta7e3ba1df50e4be9148baa2396a0d19f4fe73b8e (diff)
downloadmariadb-git-669cbe6e5fffb715e117a96273db9c95e229b3a9.tar.gz
Portability fixes
Don't define crc32 if we are not linking with gzip cmd-line-utils/libedit/libedit_term.h: Rename: cmd-line-utils/libedit/term.h -> cmd-line-utils/libedit/libedit_term.h BitKeeper/etc/ignore: added scripts/make_win_src_distribution client/connect_test.c: Removed wrong include file (my_global.h should never be included by an external client) client/insert_test.c: Removed wrong include file (my_global.h should never be included by an external client) client/select_test.c: Removed wrong include file (my_global.h should never be included by an external client) cmd-line-utils/libedit/Makefile.am: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/el.h: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/key.h: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/makelist: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/read.c: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/readline.c: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/readline/readline.h: Systems that has sys/cdefs may not have __BEGIN_DECLS cmd-line-utils/libedit/sig.c: sig_t is not portable cmd-line-utils/libedit/sig.h: sig_t is not portable cmd-line-utils/libedit/term.c: Portablity fixes Fixed core dump when using a terminal without arrow key definitions heap/_check.c: Portability fix heap/hp_hash.c: Portability fix heap/hp_rkey.c: Portability fix include/my_global.h: Portability fixes for HPUX11 libmysql/libmysql.c: Removed wrong cast mysql-test/r/union.result: New union tests mysql-test/t/union.test: New union tests sql/gen_lex_hash.cc: Fixed portability bug. sql/gstream.h: Portablity fix sql/item_create.cc: Don't define crc32 if we are not linking with gzip sql/item_create.h: Don't define crc32 if we are not linking with gzip sql/item_func.cc: Don't define crc32 if we are not linking with gzip sql/item_func.h: Don't define crc32 if we are not linking with gzip sql/lex.h: Don't define crc32 if we are not linking with gzip sql/sql_show.cc: Name can't be NULL
Diffstat (limited to 'cmd-line-utils/libedit/readline.c')
-rw-r--r--cmd-line-utils/libedit/readline.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmd-line-utils/libedit/readline.c b/cmd-line-utils/libedit/readline.c
index e9c8409102c..863ee064ab0 100644
--- a/cmd-line-utils/libedit/readline.c
+++ b/cmd-line-utils/libedit/readline.c
@@ -52,6 +52,9 @@
#include "sys.h"
#include "el.h"
#include "fcns.h" /* for EL_NUM_FCNS */
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
/* for rl_complete() */
#define TAB '\r'
@@ -389,7 +392,7 @@ _history_expand_command(const char *command, size_t cmdlen, char **result)
*result = NULL;
- cmd = alloca(cmdlen + 1);
+ cmd = (char*) alloca(cmdlen + 1);
(void) strncpy(cmd, command, cmdlen);
cmd[cmdlen] = 0;
@@ -422,7 +425,7 @@ _history_expand_command(const char *command, size_t cmdlen, char **result)
return (-1);
prefix = 0;
}
- search = alloca(len + 1);
+ search = (char*) alloca(len + 1);
(void) strncpy(search, &cmd[idx], len);
search[len] = '\0';
@@ -662,7 +665,7 @@ history_expand(char *str, char **output)
if (str[0] == history_subst_char) {
/* ^foo^foo2^ is equivalent to !!:s^foo^foo2^ */
- temp = alloca(4 + strlen(str) + 1);
+ temp = (char*) alloca(4 + strlen(str) + 1);
temp[0] = temp[1] = history_expansion_char;
temp[2] = ':';
temp[3] = 's';
@@ -1456,7 +1459,7 @@ rl_complete_internal(int what_to_do)
ctemp--;
len = li->cursor - ctemp;
- temp = alloca(len + 1);
+ temp = (char*) alloca(len + 1);
(void) strncpy(temp, ctemp, len);
temp[len] = '\0';