diff options
author | Nirbhay Choubey <nirbhay.choubey@oracle.com> | 2011-10-21 18:14:35 +0530 |
---|---|---|
committer | Nirbhay Choubey <nirbhay.choubey@oracle.com> | 2011-10-21 18:14:35 +0530 |
commit | cf8153b8bcce75cbe1e9bd1318f5c3e012de3a87 (patch) | |
tree | 4ea0e33d498ced02c92795c327efdddcf85abe1b /cmd-line-utils | |
parent | a3491852b2ca61414ac6c730aeb064f075ebe029 (diff) | |
parent | 0b3077b6ef594419b723c9e63b2ebce27a8ed6ae (diff) | |
download | mariadb-git-cf8153b8bcce75cbe1e9bd1318f5c3e012de3a87.tar.gz |
Merge of fix for bug#13106585 from mysql-5.1.
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/libedit/CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmd-line-utils/libedit/chartype.c | 3 | ||||
-rw-r--r-- | cmd-line-utils/libedit/histedit.h | 9 | ||||
-rw-r--r-- | cmd-line-utils/libedit/refresh.c | 2 | ||||
-rw-r--r-- | cmd-line-utils/libedit/sys.h | 15 | ||||
-rw-r--r-- | cmd-line-utils/libedit/terminal.c | 3 |
6 files changed, 15 insertions, 18 deletions
diff --git a/cmd-line-utils/libedit/CMakeLists.txt b/cmd-line-utils/libedit/CMakeLists.txt index a6b6fe6b0b4..c488fa34512 100644 --- a/cmd-line-utils/libedit/CMakeLists.txt +++ b/cmd-line-utils/libedit/CMakeLists.txt @@ -156,6 +156,7 @@ ${CURSES_INCLUDE_PATH} SET(LIBEDIT_SOURCES chared.c + chartype.c el.c eln.c history.c diff --git a/cmd-line-utils/libedit/chartype.c b/cmd-line-utils/libedit/chartype.c index 3d66c48c36e..b70aebeec46 100644 --- a/cmd-line-utils/libedit/chartype.c +++ b/cmd-line-utils/libedit/chartype.c @@ -258,9 +258,6 @@ out: return NULL; } -#ifdef WIDECHAR -int wcwidth(wchar_t wc); // Signature. -#endif protected int ct_visual_width(Char c) diff --git a/cmd-line-utils/libedit/histedit.h b/cmd-line-utils/libedit/histedit.h index b066593cefd..9f2b245f851 100644 --- a/cmd-line-utils/libedit/histedit.h +++ b/cmd-line-utils/libedit/histedit.h @@ -247,15 +247,6 @@ int tok_str(Tokenizer *, const char *, /* * Begin Wide Character Support */ -#ifdef __linux__ -/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#endif - -#include <wchar.h> -#include <wctype.h> /* * Wide character versions diff --git a/cmd-line-utils/libedit/refresh.c b/cmd-line-utils/libedit/refresh.c index a144059f700..64057eaabfe 100644 --- a/cmd-line-utils/libedit/refresh.c +++ b/cmd-line-utils/libedit/refresh.c @@ -40,8 +40,6 @@ static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93"; #endif #endif /* not lint && not SCCSID */ -#include "chartype.c" /* XXXMYSQL */ - /* * refresh.c: Lower level screen refreshing functions */ diff --git a/cmd-line-utils/libedit/sys.h b/cmd-line-utils/libedit/sys.h index 2731fb5f30e..33638d1565b 100644 --- a/cmd-line-utils/libedit/sys.h +++ b/cmd-line-utils/libedit/sys.h @@ -92,8 +92,21 @@ size_t strlcpy(char *dst, const char *src, size_t size); char *fgetln(FILE *fp, size_t *len); #endif -#ifndef HAVE_WCSDUP +#ifdef __linux__ +/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#endif + +#ifndef __USE_XOPEN +#define __USE_XOPEN +#endif + #include <wchar.h> +#include <wctype.h> + +#ifndef HAVE_WCSDUP wchar_t *wcsdup(const wchar_t *); #endif diff --git a/cmd-line-utils/libedit/terminal.c b/cmd-line-utils/libedit/terminal.c index ae91d9afe92..8cfbeac7c52 100644 --- a/cmd-line-utils/libedit/terminal.c +++ b/cmd-line-utils/libedit/terminal.c @@ -636,9 +636,6 @@ mc_again: el->el_cursor.h = where; /* now where is here */ } -#ifdef WIDECHAR -int wcwidth(wchar_t); // Signature. -#endif /* terminal_overwrite(): * Overstrike num characters |