- Update to Python 2.4.2. [1]

- Allow to override a command passing to distutils using
  PYDISTUTILS_{CONFIGURE,BUILD,INSTALL}_TARGET [2]
- Allow to specify BUILD/RUN dependency separatedly. [3]
- Replace shell executions with regex replacement on bsd.python.mk. [3]
- Remove thread serialization from socket.getaddrinfo() on FreeBSD 5.3
  and later versions because we've got thread-safe implementation. [4]
- Add a workaround to avoid curses.h problem of FreeBSD base.

PR:		86685 [1]
Submitted by:	Soeren Straarup <xride@x12.dk> [1],
		lioux [2], vsevolod [3], sobomax [4]
Obtained from:	Python CVS [4]
This commit is contained in:
Hye-Shik Chang 2005-10-02 14:31:39 +00:00
parent 12add669af
commit 08a19a2887
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=143983
12 changed files with 130 additions and 138 deletions

View file

@ -104,6 +104,15 @@ Python_Include_MAINTAINER= perky@FreeBSD.org
# USE_PYDISTUTILS: Use distutils as do-configure, do-build and do-install
# targets.
#
# PYDISTUTILS_CONFIGURE_TARGET: Pass this command to distutils on configure
# stage. default: config
#
# PYDISTUTILS_BUILD_TARGET: Pass this command to distutils on build stage.
# default: build
#
# PYDISTUTILS_INSTALL_TARGET: Pass this command to distutils on install
# stage. default: install
#
# PYDISTUTILS_CONFIGUREARGS: Arguments to config with distutils.
# default: <empty>
#
@ -116,12 +125,16 @@ Python_Include_MAINTAINER= perky@FreeBSD.org
# PYSETUP: Name of the setup script used by the distutils package.
# default: setup.py
#
# USE_TWISTED: If this option is just yes then
# USE_TWISTED: If this option is just yes then build and run
# the dependence to twistedCore is added. Alternatively here
# can be listed specific components of twisted framework,
# available components are: web, lore, news, words, pair,
# available components are: web, web2, lore, news, words, pair,
# mail, names, xish, runner, flow and conch. Note that
# core component is required for any of this optional components.
# core component is required for any of this optional components.
#
# USE_TWISTED_BUILD: Same as previous but add only build dependency.
#
# USE_TWISTED_RUN: Same as USE_TWISTED but add only run dependency.
#
# USE_ZOPE: Use Zope - an object-based web application platform, this
# also sets up ZOPEBASEDIR - relative base directory of zope
@ -139,7 +152,7 @@ PYTHON_VERSION= python2.3
.endif
.if defined(PYTHON_VERSION)
_PYTHON_VERSION!= ${ECHO_CMD} "${PYTHON_VERSION}" | ${SED} 's/^python//'
_PYTHON_VERSION:= ${PYTHON_VERSION:S/^python//}
_PYTHON_CMD= ${LOCALBASE}/bin/${PYTHON_VERSION}
.else
# Determine the currently installed version. If Python is not installed, a
@ -169,12 +182,12 @@ USE_PYTHON_RUN= yes
.endif # !defined(USE_PYTHON)
# Validate Python version whether it meets USE_PYTHON version restriction.
_PYTHON_VERSION_CHECK!= ${ECHO_CMD} "${USE_PYTHON}" | \
${SED} 's/^\([1-9]\.[0-9]\)$$/\1-\1/'
_PYTHON_VERSION_MINIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
${SED} -n 's/.*\([1-9]\.[0-9]\)[-+].*/\1/p'
_PYTHON_VERSION_MAXIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
${SED} -n 's/.*-\([1-9]\.[0-9]\).*/\1/p'
_PYTHON_VERSION_CHECK:= ${USE_PYTHON:C/^([1-9]\.[0-9])$/\1-\1/}
_PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/([1-9]\.[0-9])[-+].*/\1/}
_PYTHON_VERSION_MINIMUM:= ${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[0-9]}
_PYTHON_VERSION_MAXIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/.*-([1-9]\.[0-9])/\1/}
_PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]}
.if !empty(_PYTHON_VERSION_MINIMUM) && ( \
${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM})
_PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least
@ -231,9 +244,9 @@ PYTHON_SUFFIX= 25
# Python-2.4
.elif ${PYTHON_VERSION} == "python2.4"
PYTHON_PORTVERSION?=2.4.1
PYTHON_PORTVERSION?=2.4.2
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python
PYTHON_REL= 241
PYTHON_REL= 242
PYTHON_SUFFIX= 24
# Python-2.3
@ -359,43 +372,85 @@ PLIST_SUB+= ZOPEBASEDIR=${SZOPEBASEDIR} \
.endif
# Twisted specific routines
.if defined(USE_TWISTED) || defined(USE_TWISTED_BUILD) || defined(USE_TWISTED_RUN)
.if defined(USE_TWISTED_BUILD) && defined(USE_TWISTED_RUN)
. if ${USE_TWISTED_BUILD} != ${USE_TWISTED_RUN}
IGNORE= : USE_TWISTED_BUILD and USE_TWISTED_RUN must have equal values
. endif
.endif
.if defined(USE_TWISTED)
TWISTED_BUILD_DEP= yes
TWISTED_RUN_DEP= yes
.else
. if defined(USE_TWISTED_BUILD)
TWISTED_BUILD_DEP= yes
USE_TWISTED= ${USE_TWISTED_BUILD}
. endif
. if defined(USE_TWISTED_RUN)
TWISTED_RUN_DEP= yes
USE_TWISTED= ${USE_TWISTED_RUN}
. endif
.endif
.if ${USE_TWISTED} == "20" || ${USE_TWISTED} == "yes"
USE_TWISTED_VER= ${USE_TWISTED}
. if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
. endif
. if defined(TWISTED_RUN_DEP)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
. endif
.elif ${USE_TWISTED} == "13"
USE_TWISTED_VER= ${USE_TWISTED}
. if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted
. endif
. if defined(TWISTED_RUN_DEP)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted
. endif
.else
USE_TWISTED_VER= "20"
USE_TWISTED_VER= 20
# Checking for twisted components
_TWISTED_COMPONENTS?= web lore news words pair mail names xish runner flow conch
_TWISTED_COMPONENTS?= web web2 lore news words pair mail names xish runner flow conch
# XXX Should be here other dependencies types?
web_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web/__init__.py:${PORTSDIR}/www/py-twistedWeb
lore_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/textproc/__init__.py:${PORTSDIR}/textproc/py-twistedLore
news_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/news/__init__.py:${PORTSDIR}/news/py-twistedNews
words_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/words/__init__.py:${PORTSDIR}/net/py-twistedWords
pair_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/pair/__init__.py:${PORTSDIR}/net/py-twistedPair
mail_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/mail/__init__.py:${PORTSDIR}/mail/py-twistedMail
names_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/names/__init__.py:${PORTSDIR}/dns/py-twistedNames
xish_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/xish/__init__.py:${PORTSDIR}/devel/py-twistedXish
web_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web/__init__.py:${PORTSDIR}/www/py-twistedWeb
web2_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web2/__init__.py:${PORTSDIR}/www/py-twistedWeb2
lor_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/textproc/__init__.py:${PORTSDIR}/textproc/py-twistedLore
news_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/news/__init__.py:${PORTSDIR}/news/py-twistedNews
words_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/words/__init__.py:${PORTSDIR}/net/py-twistedWords
pair_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/pair/__init__.py:${PORTSDIR}/net/py-twistedPair
mail_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/mail/__init__.py:${PORTSDIR}/mail/py-twistedMail
names_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/names/__init__.py:${PORTSDIR}/dns/py-twistedNames
xish_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/xish/__init__.py:${PORTSDIR}/devel/py-twistedXish
runner_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/runner/__init__.py:${PORTSDIR}/devel/py-twistedRunner
flow_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/flow/__init__.py:${PORTSDIR}/devel/py-twistedFlow
conch_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/conch/__init__.py:${PORTSDIR}/security/py-twistedConch
flow_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/flow/__init__.py:${PORTSDIR}/devel/py-twistedFlow
conch_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/conch/__init__.py:${PORTSDIR}/security/py-twistedConch
.for component in ${_TWISTED_COMPONENTS}
_COMP_TEST= ${USE_TWISTED:M${component}}
. if ${_COMP_TEST:S/${component}//}!=${_COMP_TEST:S/ / /g}
RUN_DEPENDS+= ${${component}_RUN_DEPENDS}
. if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${${component}_DEPENDS}
. endif
. if defined(TWISTED_RUN_DEP)
RUN_DEPENDS+= ${${component}_DEPENDS}
. endif
. endif
.endfor
# Implicit dependency from core
.if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
.endif
.if defined(TWISTED_RUN_DEP)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
.endif
.endif
.endif # defined(USE_TWISTED)
# XXX Hm, should I export some of the variables above to *_ENV?
@ -407,20 +462,24 @@ RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twis
Python_Post_Include= bsd.python.mk
# py-distutils support
PYDISTUTILS_CONFIGURE_TARGET?= config
PYDISTUTILS_BUILD_TARGET?= build
PYDISTUTILS_INSTALL_TARGET?= install
.if defined(USE_PYDISTUTILS)
.if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE)
do-configure:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} config ${PYDISTUTILS_CONFIGUREARGS})
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS})
.endif
.if !target(do-build)
do-build:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} build ${PYDISTUTILS_BUILDARGS})
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS})
.endif
.if !target(do-install)
do-install:
@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} install ${PYDISTUTILS_INSTALLARGS})
@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS})
.endif
.endif # defined(USE_PYDISTUTILS)

View file

@ -79,3 +79,8 @@ MD5 (python/pdf-a4-2.4.1.tar.bz2) = 5a15fc66b7b3a927c2f1c503fa41dec7
MD5 (python/pdf-letter-2.4.1.tar.bz2) = c4b988a0d09adb3d120121395d679e2e
MD5 (python/postscript-letter-2.4.1.tar.bz2) = 37465c3e957a5836901238193c3bcc88
MD5 (python/postscript-a4-2.4.1.tar.bz2) = 64b0ab6de74ea5620d558b2f9fd7b1ee
MD5 (python/html-2.4.2.tar.bz2) = 4e3f177f32e15713130d9d9cf35f991f
MD5 (python/pdf-a4-2.4.2.tar.bz2) = f9712931eb8dd460000596eec0694bfc
MD5 (python/pdf-letter-2.4.2.tar.bz2) = 82d1ae6045042c08a6a68f69fe2831c2
MD5 (python/postscript-a4-2.4.2.tar.bz2) = 2ef6f2128333042f82c365697ac8d5be
MD5 (python/postscript-letter-2.4.2.tar.bz2) = 11d90c85951dc2439e0f32459380dbbd

View file

@ -6,8 +6,7 @@
#
PORTNAME= python
PORTVERSION= 2.4.1
PORTREVISION= 3
PORTVERSION= 2.4.2
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
@ -16,7 +15,6 @@ DISTFILES= ${PYTHON_DISTFILE}
MAINTAINER= perky@FreeBSD.org
COMMENT?= An interpreted object-oriented programming language
CONFLICTS= stackless_python-*
DIST_SUBDIR= python
WRKSRC= ${PYTHON_WRKSRC}
GNU_CONFIGURE= yes
@ -47,6 +45,9 @@ OPTIONS= THREADS "Enable thread support" on \
.include <bsd.port.pre.mk>
# workaround for a bug in base curses.h.
CFLAGS+= -D__wchar_t=wchar_t
.if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS}

View file

@ -19,6 +19,8 @@ MD5 (python/Python-2.4.tgz) = 149ad508f936eccf669d52682cf8e606
SIZE (python/Python-2.4.tgz) = 9198035
MD5 (python/Python-2.4.1.tgz) = 7bb2416a4f421c3452d306694d3efbba
SIZE (python/Python-2.4.1.tgz) = 9219882
MD5 (python/Python-2.4.2.tgz) = 07cfc759546f6723bb367be5b1ce9875
SIZE (python/Python-2.4.2.tgz) = 9239975
MD5 (python/Python-2.5.a0.20050129.tgz) = bdf571f3e28c4793bedbd180611c28e6
SIZE (python/Python-2.5.a0.20050129.tgz) = 9227299
MD5 (python/Python-2.5.a0.20050728.tgz) = 423c9ac2dbe3a754195e26652495aac3

View file

@ -1,17 +0,0 @@
--- Lib/test/test_fcntl.py.orig Sun Apr 3 22:45:13 2005
+++ Lib/test/test_fcntl.py Sun Apr 3 22:45:19 2005
@@ -24,7 +24,13 @@
'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'freebsd6',
'bsdos2', 'bsdos3', 'bsdos4',
'openbsd', 'openbsd2', 'openbsd3'):
- lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, fcntl.F_WRLCK, 0)
+ if struct.calcsize('l') == 8:
+ off_t = 'l'
+ pid_t = 'i'
+ else:
+ off_t = 'lxxxx'
+ pid_t = 'l'
+ lockdata = struct.pack(off_t+off_t+pid_t+'hh', 0, 0, 0, fcntl.F_WRLCK, 0)
elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']:
lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
elif sys.platform in ['os2emx']:

View file

@ -1,35 +0,0 @@
Index: Modules/fcntlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -r2.43 -r2.44
--- Modules/fcntlmodule.c 30 Nov 2004 14:31:54 -0000 2.43
+++ Modules/fcntlmodule.c 27 Jul 2005 20:24:30 -0000 2.44
@@ -102,7 +102,7 @@
int mutate_arg = 1;
char buf[1024];
- if (PyArg_ParseTuple(args, "O&iw#|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
@@ -151,7 +151,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&is#:ioctl",
+ if (PyArg_ParseTuple(args, "O&Is#:ioctl",
conv_descriptor, &fd, &code, &str, &len)) {
if (len > sizeof buf) {
PyErr_SetString(PyExc_ValueError,
@@ -172,7 +172,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&i|i;ioctl requires a file or file descriptor,"
+ "O&I|i;ioctl requires a file or file descriptor,"
" an integer and optionally a integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;

View file

@ -0,0 +1,13 @@
--- Modules/socketmodule.c.orig Sun Oct 2 21:49:22 2005
+++ Modules/socketmodule.c Sun Oct 2 21:50:01 2005
@@ -142,7 +142,9 @@
/* On systems on which getaddrinfo() is believed to not be thread-safe,
(this includes the getaddrinfo emulation) protect access with a lock. */
-#if defined(WITH_THREAD) && (defined(__APPLE__) || defined(__FreeBSD__) || \
+#include <sys/param.h>
+#if defined(WITH_THREAD) && (defined(__APPLE__) || \
+ (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif

View file

@ -6,8 +6,7 @@
#
PORTNAME= python
PORTVERSION= 2.4.1
PORTREVISION= 3
PORTVERSION= 2.4.2
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
@ -16,7 +15,6 @@ DISTFILES= ${PYTHON_DISTFILE}
MAINTAINER= perky@FreeBSD.org
COMMENT?= An interpreted object-oriented programming language
CONFLICTS= stackless_python-*
DIST_SUBDIR= python
WRKSRC= ${PYTHON_WRKSRC}
GNU_CONFIGURE= yes
@ -47,6 +45,9 @@ OPTIONS= THREADS "Enable thread support" on \
.include <bsd.port.pre.mk>
# workaround for a bug in base curses.h.
CFLAGS+= -D__wchar_t=wchar_t
.if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS}

View file

@ -19,6 +19,8 @@ MD5 (python/Python-2.4.tgz) = 149ad508f936eccf669d52682cf8e606
SIZE (python/Python-2.4.tgz) = 9198035
MD5 (python/Python-2.4.1.tgz) = 7bb2416a4f421c3452d306694d3efbba
SIZE (python/Python-2.4.1.tgz) = 9219882
MD5 (python/Python-2.4.2.tgz) = 07cfc759546f6723bb367be5b1ce9875
SIZE (python/Python-2.4.2.tgz) = 9239975
MD5 (python/Python-2.5.a0.20050129.tgz) = bdf571f3e28c4793bedbd180611c28e6
SIZE (python/Python-2.5.a0.20050129.tgz) = 9227299
MD5 (python/Python-2.5.a0.20050728.tgz) = 423c9ac2dbe3a754195e26652495aac3

View file

@ -1,17 +0,0 @@
--- Lib/test/test_fcntl.py.orig Sun Apr 3 22:45:13 2005
+++ Lib/test/test_fcntl.py Sun Apr 3 22:45:19 2005
@@ -24,7 +24,13 @@
'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', 'freebsd6',
'bsdos2', 'bsdos3', 'bsdos4',
'openbsd', 'openbsd2', 'openbsd3'):
- lockdata = struct.pack('lxxxxlxxxxlhh', 0, 0, 0, fcntl.F_WRLCK, 0)
+ if struct.calcsize('l') == 8:
+ off_t = 'l'
+ pid_t = 'i'
+ else:
+ off_t = 'lxxxx'
+ pid_t = 'l'
+ lockdata = struct.pack(off_t+off_t+pid_t+'hh', 0, 0, 0, fcntl.F_WRLCK, 0)
elif sys.platform in ['aix3', 'aix4', 'hp-uxB', 'unixware7']:
lockdata = struct.pack('hhlllii', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
elif sys.platform in ['os2emx']:

View file

@ -1,35 +0,0 @@
Index: Modules/fcntlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -r2.43 -r2.44
--- Modules/fcntlmodule.c 30 Nov 2004 14:31:54 -0000 2.43
+++ Modules/fcntlmodule.c 27 Jul 2005 20:24:30 -0000 2.44
@@ -102,7 +102,7 @@
int mutate_arg = 1;
char buf[1024];
- if (PyArg_ParseTuple(args, "O&iw#|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
@@ -151,7 +151,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&is#:ioctl",
+ if (PyArg_ParseTuple(args, "O&Is#:ioctl",
conv_descriptor, &fd, &code, &str, &len)) {
if (len > sizeof buf) {
PyErr_SetString(PyExc_ValueError,
@@ -172,7 +172,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&i|i;ioctl requires a file or file descriptor,"
+ "O&I|i;ioctl requires a file or file descriptor,"
" an integer and optionally a integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;

View file

@ -0,0 +1,13 @@
--- Modules/socketmodule.c.orig Sun Oct 2 21:49:22 2005
+++ Modules/socketmodule.c Sun Oct 2 21:50:01 2005
@@ -142,7 +142,9 @@
/* On systems on which getaddrinfo() is believed to not be thread-safe,
(this includes the getaddrinfo emulation) protect access with a lock. */
-#if defined(WITH_THREAD) && (defined(__APPLE__) || defined(__FreeBSD__) || \
+#include <sys/param.h>
+#if defined(WITH_THREAD) && (defined(__APPLE__) || \
+ (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif