MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:June 4 2007 2:42pm
Subject:bk commit into 4.1 tree (msvensson:1.2645) BUG#10218
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-04 16:42:42+02:00, msvensson@pilot.(none) +2 -0
  Bug#10218 Command line recall rolls into Segmentation Fault(coredump)'
   - Declare 'tgoto' if not already declared in system header files. 

  cmd-line-utils/libedit/el_term.h@stripped, 2007-06-04 16:42:35+02:00, msvensson@pilot.(none) +10 -0
    Declare 'tgoto' if not already declared in system header files. Failing
    to declare it will cause the pointer returned to be truncated
    to 32-bit integer which is no a valid pointer - in most cases. 

  configure.in@stripped, 2007-06-04 16:42:35+02:00, msvensson@pilot.(none) +13 -0
    Add check to see if 'tgoto' is declared in system header files

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	pilot.(none)
# Root:	/data/msvensson/mysql/bug10218/my41-bug10218

--- 1.431/configure.in	2007-03-14 14:29:22 +01:00
+++ 1.432/configure.in	2007-06-04 16:42:35 +02:00
@@ -1954,6 +1954,19 @@ else
 fi
 AC_SUBST(TERMCAP_LIB)
 
+# Check if the termcap function 'tgoto' is already declared in
+# system header files or if it need to be declared locally
+AC_CHECK_DECLS(tgoto,,,[
+#ifdef HAVE_CURSES_H
+# include <curses.h>
+#elif HAVE_NCURSES_H
+# include <ncurses.h>
+#endif
+#ifdef HAVE_TERM_H
+# include <term.h>
+#endif
+])
+
 LIBEDIT_LOBJECTS=""
 AC_CHECK_FUNC(strunvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS unvis.o"])
 AC_CHECK_FUNC(strvis,   ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS vis.o"])

--- 1.1/cmd-line-utils/libedit/el_term.h	2005-04-21 12:06:39 +02:00
+++ 1.2/cmd-line-utils/libedit/el_term.h	2007-06-04 16:42:35 +02:00
@@ -90,6 +90,16 @@ extern char* tgoto(const char*, int, int
 extern char* tgetstr(char*, char**);
 #endif
 
+
+#if !HAVE_DECL_TGOTO
+/*
+  'tgoto' is not declared in the system header files, this causes
+  problems on 64-bit systems. The function returns a 64 bit pointer
+  but caller see it as "int" and it's thus truncated to 32-bit
+*/
+extern char* tgoto(const char*, int, int);
+#endif
+
 protected void	term_move_to_line(EditLine *, int);
 protected void	term_move_to_char(EditLine *, int);
 protected void	term_clear_EOL(EditLine *, int);
Thread
bk commit into 4.1 tree (msvensson:1.2645) BUG#10218msvensson4 Jun