aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python23
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-01-21 21:13:23 +0800
committerrafan <rafan@FreeBSD.org>2007-01-21 21:13:23 +0800
commitad8a7ea222a1acd563f1f2bcf74ca73b3ebad101 (patch)
tree0d200b8520a9a51c0ace2fd437fd340aa02e8917 /lang/python23
parent4acdb485523ec29b946775c9e83dc7d2cebd3249 (diff)
downloadfreebsd-ports-gnome-ad8a7ea222a1acd563f1f2bcf74ca73b3ebad101.tar.gz
freebsd-ports-gnome-ad8a7ea222a1acd563f1f2bcf74ca73b3ebad101.tar.zst
freebsd-ports-gnome-ad8a7ea222a1acd563f1f2bcf74ca73b3ebad101.zip
- history_length conflicts with include/readline/history.h.
Similar fix is in 2.4 and above. This causes an incomplete pkg-plist with gcc 4.x + newer ncurses. PR: ports/108031 Approved by: alexbl
Diffstat (limited to 'lang/python23')
-rw-r--r--lang/python23/files/patch-Modules-readline.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/lang/python23/files/patch-Modules-readline.c b/lang/python23/files/patch-Modules-readline.c
new file mode 100644
index 000000000000..a6b7f782d03c
--- /dev/null
+++ b/lang/python23/files/patch-Modules-readline.c
@@ -0,0 +1,44 @@
+--- Modules/readline.c.orig Wed Jan 17 18:10:23 2007
++++ Modules/readline.c Wed Jan 17 18:12:54 2007
+@@ -93,7 +93,7 @@
+ return Py_None;
+ }
+
+-static int history_length = -1; /* do not truncate history by default */
++static int _history_length = -1; /* do not truncate history by default */
+ PyDoc_STRVAR(doc_read_history_file,
+ "read_history_file([filename]) -> None\n\
+ Load a readline history file.\n\
+@@ -109,8 +109,8 @@
+ if (!PyArg_ParseTuple(args, "|z:write_history_file", &s))
+ return NULL;
+ errno = write_history(s);
+- if (!errno && history_length >= 0)
+- history_truncate_file(s, history_length);
++ if (!errno && _history_length >= 0)
++ history_truncate_file(s, _history_length);
+ if (errno)
+ return PyErr_SetFromErrno(PyExc_IOError);
+ Py_INCREF(Py_None);
+@@ -128,10 +128,10 @@
+ static PyObject*
+ set_history_length(PyObject *self, PyObject *args)
+ {
+- int length = history_length;
++ int length = _history_length;
+ if (!PyArg_ParseTuple(args, "i:set_history_length", &length))
+ return NULL;
+- history_length = length;
++ _history_length = length;
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+@@ -148,7 +148,7 @@
+ static PyObject*
+ get_history_length(PyObject *self, PyObject *noarg)
+ {
+- return PyInt_FromLong(history_length);
++ return PyInt_FromLong(_history_length);
+ }
+
+ PyDoc_STRVAR(get_history_length_doc,