]> granicus.if.org Git - python/commitdiff
Merged revisions 75725 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 26 Oct 2009 19:22:14 +0000 (19:22 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 26 Oct 2009 19:22:14 +0000 (19:22 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75725 | antoine.pitrou | 2009-10-26 20:16:46 +0100 (lun., 26 oct. 2009) | 4 lines

  Some platforms have rl_completion_append_character but not rl_completion_suppress_append.
  Reported by Mark D.
........

Modules/readline.c
configure
configure.in
pyconfig.h.in

index 51844f73eb8b086c3504acad5ea5dcfef61cc375..705d766b9704c87cfea3340b2638a1d95f8fbe29 100644 (file)
@@ -802,6 +802,8 @@ flex_complete(char *text, int start, int end)
 {
 #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
        rl_completion_append_character ='\0';
+#endif
+#ifdef HAVE_RL_COMPLETION_SUPPRESS_APPEND
        rl_completion_suppress_append = 0;
 #endif
        Py_XDECREF(begidx);
index 9a09bc92975c040637b4c01c86cedb6ac8347d07..ff1a5607b73cadeabe5318bbd36b1fd024a4b67c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 75678 .
+# From configure.in Revision: 75684 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 3.2.
 #
@@ -25053,6 +25053,25 @@ cat >>confdefs.h <<\_ACEOF
 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
 _ACEOF
 
+fi
+rm -f conftest*
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <readline/readline.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
+_ACEOF
+
 fi
 rm -f conftest*
 
index 23d3ee4250ff590e0bece38ba001689dc07fa7aa..6db50b9012d9b43be1e02eff8d5dc5599eeabbb6 100644 (file)
@@ -3528,6 +3528,10 @@ then
   [readline/readline.h],
   AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
   [Define if you have readline 2.2]), )
+  AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
+  [readline/readline.h],
+  AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
+  [Define if you have rl_completion_suppress_append]), )
 fi
 
 # check for readline 4.0
index 3df44d46cee5f66d073c39a87c676ac8505a8f3a..eb25449966ab470d94d0671b0d4ef0241423ee9a 100644 (file)
 /* Define if you have readline 4.2 */
 #undef HAVE_RL_COMPLETION_MATCHES
 
+/* Define if you have rl_completion_suppress_append */
+#undef HAVE_RL_COMPLETION_SUPPRESS_APPEND
+
 /* Define if you have readline 4.0 */
 #undef HAVE_RL_PRE_INPUT_HOOK