From python-checkins at python.org Fri Jun 1 00:15:47 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 1 Jun 2007 00:15:47 +0200 (CEST) Subject: [Python-checkins] r55723 - python/branches/bcannon-objcap/Python/Python-ast.c Message-ID: <20070531221547.26E031E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 1 00:15:46 2007 New Revision: 55723 Modified: python/branches/bcannon-objcap/Python/Python-ast.c Log: SVN number update for AST. Modified: python/branches/bcannon-objcap/Python/Python-ast.c ============================================================================== --- python/branches/bcannon-objcap/Python/Python-ast.c (original) +++ python/branches/bcannon-objcap/Python/Python-ast.c Fri Jun 1 00:15:46 2007 @@ -2,7 +2,7 @@ /* - __version__ 43614. + __version__ 55591. This module must be committed separately after each AST grammar change; The __version__ number is set to the revision number of the commit @@ -2947,7 +2947,7 @@ if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) return; - if (PyModule_AddStringConstant(m, "__version__", "43614") < 0) + if (PyModule_AddStringConstant(m, "__version__", "55591") < 0) return; if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) From python-checkins at python.org Fri Jun 1 04:35:11 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 1 Jun 2007 04:35:11 +0200 (CEST) Subject: [Python-checkins] r55725 - peps/trunk/pep-3100.txt Message-ID: <20070601023511.774691E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 1 04:35:09 2007 New Revision: 55725 Modified: peps/trunk/pep-3100.txt Log: Update on the removal of cfmfile. Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Fri Jun 1 04:35:09 2007 @@ -210,7 +210,8 @@ - ``reconvert``, ``stringold``, ``xmllib``, ``pcre``, ``pypcre``, ``strop`` [all done] + see PEP 4 [#pep4]_ - - ``mimetools``, + - ``buildtools``, + ``mimetools``, ``mpz``, ``multifile``, ``posixfile``, @@ -224,7 +225,7 @@ ``TERMIOS``, ``timing`` [to do] - - ``gopherlib``, ``md5``, ``MimeWriter``, ``mimify`` [done] + - ``cfmfile``, ``gopherlib``, ``md5``, ``MimeWriter``, ``mimify`` [done] - ``cl``, ``sets``, ``xreadlines``, ``rotor``, ``whrandom`` [done] + Everything in lib-old [#pep4]_ [done] - ``Para``, ``addpack``, ``cmp``, ``cmpcache``, ``codehack``, From python-checkins at python.org Fri Jun 1 06:56:52 2007 From: python-checkins at python.org (neal.norwitz) Date: Fri, 1 Jun 2007 06:56:52 +0200 (CEST) Subject: [Python-checkins] r55726 - python/trunk/Misc/build.sh Message-ID: <20070601045652.440E91E400A@bag.python.org> Author: neal.norwitz Date: Fri Jun 1 06:56:47 2007 New Revision: 55726 Modified: python/trunk/Misc/build.sh Log: Mail if there is an installation failure. Modified: python/trunk/Misc/build.sh ============================================================================== --- python/trunk/Misc/build.sh (original) +++ python/trunk/Misc/build.sh Fri Jun 1 06:56:47 2007 @@ -166,6 +166,7 @@ start=`current_time` make install >& build/$F update_status "Installing" "$F" $start + mail_on_failure "install" build/$F if [ ! -x $PYTHON ]; then ln -s ${PYTHON}2.* $PYTHON From python-checkins at python.org Fri Jun 1 07:20:08 2007 From: python-checkins at python.org (neal.norwitz) Date: Fri, 1 Jun 2007 07:20:08 +0200 (CEST) Subject: [Python-checkins] r55728 - peps/trunk/pep-3100.txt Message-ID: <20070601052008.4DCD91E4003@bag.python.org> Author: neal.norwitz Date: Fri Jun 1 07:20:05 2007 New Revision: 55728 Modified: peps/trunk/pep-3100.txt Log: reload is gone Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Fri Jun 1 07:20:05 2007 @@ -186,7 +186,7 @@ * ``callable()``: just use hasattr(x, '__call__') (?) [2]_ [done] * ``compile()``: put in ``sys`` (or perhaps in a module of its own) [2]_ * ``coerce()``: no longer needed [2]_ [done] -* ``execfile()``, ``reload()``: use ``exec()`` [2]_ +* ``execfile()``, ``reload()``: use ``exec()`` [2]_ [reload: done] * ``intern()``: put in ``sys`` [2]_, [22]_ [done] * ``reduce()``: write a loop instead [2]_, [9]_ [done] * ``xrange()``: use ``range()`` instead [1]_ [See range() above] [done] From python-checkins at python.org Fri Jun 1 09:29:13 2007 From: python-checkins at python.org (neal.norwitz) Date: Fri, 1 Jun 2007 09:29:13 +0200 (CEST) Subject: [Python-checkins] r55731 - in python/trunk: Lib/distutils/command/build_py.py Lib/distutils/tests/test_build_py.py Misc/ACKS Misc/NEWS Message-ID: <20070601072913.B1CA71E4003@bag.python.org> Author: neal.norwitz Date: Fri Jun 1 09:29:12 2007 New Revision: 55731 Modified: python/trunk/Lib/distutils/command/build_py.py python/trunk/Lib/distutils/tests/test_build_py.py python/trunk/Misc/ACKS python/trunk/Misc/NEWS Log: SF 1668596/1720897: distutils now copies data files even if package_dir is empty. This needs to be backported. I'm too tired tonight. It would be great if someone backports this if the buildbots are ok with it. Otherwise, I will try to get to it tomorrow. Modified: python/trunk/Lib/distutils/command/build_py.py ============================================================================== --- python/trunk/Lib/distutils/command/build_py.py (original) +++ python/trunk/Lib/distutils/command/build_py.py Fri Jun 1 09:29:12 2007 @@ -114,7 +114,9 @@ build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = 0 + if src_dir: + plen = len(src_dir)+1 # Strip directory from globbed filenames filenames = [ Modified: python/trunk/Lib/distutils/tests/test_build_py.py ============================================================================== --- python/trunk/Lib/distutils/tests/test_build_py.py (original) +++ python/trunk/Lib/distutils/tests/test_build_py.py Fri Jun 1 09:29:12 2007 @@ -1,10 +1,13 @@ """Tests for distutils.command.build_py.""" import os +import sys +import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution +from distutils.errors import DistutilsFileError from distutils.tests import support @@ -53,6 +56,38 @@ self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) + def test_empty_package_dir (self): + # See SF 1668596/1720897. + cwd = os.getcwd() + + # create the distribution files. + sources = self.mkdtemp() + open(os.path.join(sources, "__init__.py"), "w").close() + + testdir = os.path.join(sources, "doc") + os.mkdir(testdir) + open(os.path.join(testdir, "testfile"), "w").close() + + os.chdir(sources) + sys.stdout = StringIO.StringIO() + + try: + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + finally: + # Restore state. + os.chdir(cwd) + sys.stdout = sys.__stdout__ def test_suite(): return unittest.makeSuite(BuildPyTestCase) Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Fri Jun 1 09:29:12 2007 @@ -159,6 +159,7 @@ Vincent Delft Erik Demaine Roger Dev +Raghuram Devarakonda Toby Dickenson Mark Dickinson Yves Dionne Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jun 1 09:29:12 2007 @@ -220,6 +220,9 @@ Library ------- +- SF 1668596/1720897: distutils now copies data files + even if package_dir is empty. + - sha now raises a DeprecationWarning upon import. - md5 now raises a DeprecationWarning upon import. From python-checkins at python.org Fri Jun 1 13:33:39 2007 From: python-checkins at python.org (georg.brandl) Date: Fri, 1 Jun 2007 13:33:39 +0200 (CEST) Subject: [Python-checkins] r55732 - in python/trunk: Misc/NEWS Python/compile.c Message-ID: <20070601113339.871861E4003@bag.python.org> Author: georg.brandl Date: Fri Jun 1 13:33:33 2007 New Revision: 55732 Modified: python/trunk/Misc/NEWS python/trunk/Python/compile.c Log: Bug #1722484: remove docstrings again when running with -OO. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jun 1 13:33:33 2007 @@ -12,6 +12,8 @@ Core and builtins ----------------- +- Bug #1722484: remove docstrings again when running with -OO. + - Add new attribute names for function objects. All the func_* become __*__ attributes. (Some already existed, e.g., __doc__ and __name__.) Modified: python/trunk/Python/compile.c ============================================================================== --- python/trunk/Python/compile.c (original) +++ python/trunk/Python/compile.c Fri Jun 1 13:33:33 2007 @@ -1119,7 +1119,8 @@ if (!asdl_seq_LEN(stmts)) return 1; st = (stmt_ty)asdl_seq_GET(stmts, 0); - if (compiler_isdocstring(st)) { + if (compiler_isdocstring(st) && Py_OptimizeFlag < 2) { + /* don't generate docstrings if -OO */ i = 1; VISIT(c, expr, st->v.Expr.value); if (!compiler_nameop(c, __doc__, Store)) From python-checkins at python.org Fri Jun 1 13:33:47 2007 From: python-checkins at python.org (georg.brandl) Date: Fri, 1 Jun 2007 13:33:47 +0200 (CEST) Subject: [Python-checkins] r55733 - in python/branches/release25-maint: Misc/NEWS Python/compile.c Message-ID: <20070601113347.B44201E4003@bag.python.org> Author: georg.brandl Date: Fri Jun 1 13:33:45 2007 New Revision: 55733 Modified: python/branches/release25-maint/Misc/NEWS python/branches/release25-maint/Python/compile.c Log: Bug #1722484: remove docstrings again when running with -OO. (backport from rev. 55732) Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Fri Jun 1 13:33:45 2007 @@ -58,6 +58,8 @@ Core and builtins ----------------- +- Bug #1722484: remove docstrings again when running with -OO. + - Revert SF #1615701: dict.update() does *not* call __getitem__() or keys() if subclassed. This is to remain consistent with 2.5. Also revert revision 53667 with made a similar change to set.update(). Modified: python/branches/release25-maint/Python/compile.c ============================================================================== --- python/branches/release25-maint/Python/compile.c (original) +++ python/branches/release25-maint/Python/compile.c Fri Jun 1 13:33:45 2007 @@ -1779,7 +1779,8 @@ if (!asdl_seq_LEN(stmts)) return 1; st = (stmt_ty)asdl_seq_GET(stmts, 0); - if (compiler_isdocstring(st)) { + if (compiler_isdocstring(st) && Py_OptimizeFlag < 2) { + /* don't generate docstrings if -OO */ i = 1; VISIT(c, expr, st->v.Expr.value); if (!compiler_nameop(c, __doc__, Store)) From python-checkins at python.org Fri Jun 1 19:32:19 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 1 Jun 2007 19:32:19 +0200 (CEST) Subject: [Python-checkins] r55734 - python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070601173219.2D17C1E4003@bag.python.org> Author: alexandre.vassalotti Date: Fri Jun 1 19:32:18 2007 New Revision: 55734 Modified: python/branches/cpy_merge/Modules/_string_iomodule.c Log: Fix the error messages. Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Fri Jun 1 19:32:18 2007 @@ -328,7 +328,7 @@ if (!PyArg_ParseTuple(args, "u#;write() may only be called on" - "unicode strings", &ustr, &n)) + " unicode strings", &ustr, &n)) return NULL; if (write_str(self, ustr, n) == -1) @@ -406,7 +406,9 @@ assert(type != NULL && type->tp_alloc != NULL); - if (!PyArg_ParseTuple(args, "|u#:StringIO", &buf, &n)) + if (!PyArg_ParseTuple(args, + "|u#;StringIO() may only given a" + " unicode string", &buf, &n)) return NULL; self = (StringIOObject *)type->tp_alloc(type, 0); From python-checkins at python.org Fri Jun 1 21:20:33 2007 From: python-checkins at python.org (georg.brandl) Date: Fri, 1 Jun 2007 21:20:33 +0200 (CEST) Subject: [Python-checkins] r55735 - python/trunk/Misc/NEWS Message-ID: <20070601192033.5FD011E4003@bag.python.org> Author: georg.brandl Date: Fri Jun 1 21:20:27 2007 New Revision: 55735 Modified: python/trunk/Misc/NEWS Log: Fix wrong issue number. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jun 1 21:20:27 2007 @@ -12,7 +12,7 @@ Core and builtins ----------------- -- Bug #1722484: remove docstrings again when running with -OO. +- Bug #1722485: remove docstrings again when running with -OO. - Add new attribute names for function objects. All the func_* become __*__ attributes. (Some already existed, e.g., __doc__ and __name__.) From python-checkins at python.org Fri Jun 1 21:20:56 2007 From: python-checkins at python.org (georg.brandl) Date: Fri, 1 Jun 2007 21:20:56 +0200 (CEST) Subject: [Python-checkins] r55736 - python/branches/release25-maint/Misc/NEWS Message-ID: <20070601192056.6427F1E4003@bag.python.org> Author: georg.brandl Date: Fri Jun 1 21:20:52 2007 New Revision: 55736 Modified: python/branches/release25-maint/Misc/NEWS Log: Fix wrong issue number. (backport from rev. 55735) Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Fri Jun 1 21:20:52 2007 @@ -58,7 +58,7 @@ Core and builtins ----------------- -- Bug #1722484: remove docstrings again when running with -OO. +- Bug #1722485: remove docstrings again when running with -OO. - Revert SF #1615701: dict.update() does *not* call __getitem__() or keys() if subclassed. This is to remain consistent with 2.5. From nnorwitz at gmail.com Fri Jun 1 22:01:28 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 1 Jun 2007 16:01:28 -0400 Subject: [Python-checkins] Python Regression Test Failures install () Message-ID: <20070601200128.GA15143@python.psfb.org> ----------------------------------------------- Modules/Setup.dist is newer than Modules/Setup; check to make sure you have all the updates you need in your Modules/Setup file. Usually, copying Setup.dist to Setup will work. ----------------------------------------------- Creating directory /tmp/python-test/local/bin Creating directory /tmp/python-test/local/lib /usr/bin/install -c python /tmp/python-test/local/bin/python2.6 if test -f libpython2.6.so; then \ if test ".so" = .dll; then \ /usr/bin/install -c -m 555 libpython2.6.so /tmp/python-test/local/bin; \ else \ /usr/bin/install -c -m 555 libpython2.6.so /tmp/python-test/local/lib/libpython2.6.a; \ if test libpython2.6.so != libpython2.6.a; then \ (cd /tmp/python-test/local/lib; ln -sf libpython2.6.a libpython2.6.so); \ fi \ fi; \ else true; \ fi Creating directory /tmp/python-test/local/lib/python2.6 Creating directory /tmp/python-test/local/lib/python2.6/lib-tk Creating directory /tmp/python-test/local/lib/python2.6/site-packages Creating directory /tmp/python-test/local/lib/python2.6/test Creating directory /tmp/python-test/local/lib/python2.6/test/output Creating directory /tmp/python-test/local/lib/python2.6/test/decimaltestdata Creating directory /tmp/python-test/local/lib/python2.6/encodings Creating directory /tmp/python-test/local/lib/python2.6/compiler Creating directory /tmp/python-test/local/lib/python2.6/hotshot Creating directory /tmp/python-test/local/lib/python2.6/email Creating directory /tmp/python-test/local/lib/python2.6/email/mime Creating directory /tmp/python-test/local/lib/python2.6/email/test Creating directory /tmp/python-test/local/lib/python2.6/email/test/data Creating directory /tmp/python-test/local/lib/python2.6/sqlite3 Creating directory /tmp/python-test/local/lib/python2.6/sqlite3/test Creating directory /tmp/python-test/local/lib/python2.6/logging Creating directory /tmp/python-test/local/lib/python2.6/bsddb Creating directory /tmp/python-test/local/lib/python2.6/bsddb/test Creating directory /tmp/python-test/local/lib/python2.6/wsgiref Creating directory /tmp/python-test/local/lib/python2.6/ctypes Creating directory /tmp/python-test/local/lib/python2.6/ctypes/test Creating directory /tmp/python-test/local/lib/python2.6/ctypes/macholib Creating directory /tmp/python-test/local/lib/python2.6/idlelib Creating directory /tmp/python-test/local/lib/python2.6/idlelib/Icons Creating directory /tmp/python-test/local/lib/python2.6/distutils Creating directory /tmp/python-test/local/lib/python2.6/distutils/command Creating directory /tmp/python-test/local/lib/python2.6/distutils/tests Creating directory /tmp/python-test/local/lib/python2.6/xml Creating directory /tmp/python-test/local/lib/python2.6/xml/dom Creating directory /tmp/python-test/local/lib/python2.6/xml/etree Creating directory /tmp/python-test/local/lib/python2.6/xml/parsers Creating directory /tmp/python-test/local/lib/python2.6/xml/sax Creating directory /tmp/python-test/local/lib/python2.6/curses Creating directory /tmp/python-test/local/lib/python2.6/plat-linux2 /usr/bin/install -c -m 644 ./Lib/BaseHTTPServer.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/Bastion.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/CGIHTTPServer.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/ConfigParser.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/Cookie.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/DocXMLRPCServer.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/HTMLParser.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/MimeWriter.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/Queue.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/SimpleHTTPServer.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/SimpleXMLRPCServer.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/SocketServer.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/StringIO.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/UserDict.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/UserList.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/UserString.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/_LWPCookieJar.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/_MozillaCookieJar.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/__future__.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/__phello__.foo.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/_strptime.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/_threading_local.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/aifc.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/anydbm.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/asynchat.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/asyncore.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/atexit.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/audiodev.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/base64.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/bdb.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/binhex.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/bisect.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/cProfile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/calendar.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/cgi.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/cgitb.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/chunk.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/cmd.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/code.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/codecs.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/codeop.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/collections.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/colorsys.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/commands.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/compileall.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/contextlib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/cookielib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/copy.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/copy_reg.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/csv.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/dbhash.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/decimal.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/difflib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/dircache.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/dis.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/doctest.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/dumbdbm.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/dummy_thread.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/dummy_threading.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/filecmp.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/fileinput.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/fnmatch.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/formatter.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/fpformat.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/ftplib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/functools.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/genericpath.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/getopt.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/getpass.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/gettext.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/glob.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/gzip.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/hashlib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/heapq.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/hmac.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/htmlentitydefs.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/htmllib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/httplib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/ihooks.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/imaplib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/imghdr.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/imputil.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/inspect.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/keyword.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/linecache.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/locale.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/macpath.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/macurl2path.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/mailbox.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/mailcap.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/markupbase.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/md5.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/mhlib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/mimetools.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/mimetypes.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/mimify.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/modulefinder.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/multifile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/mutex.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/netrc.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/new.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/nntplib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/ntpath.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/nturl2path.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/opcode.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/optparse.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/os.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/os2emxpath.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/pdb.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pickle.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pickletools.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pipes.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pkgutil.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/platform.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/popen2.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/poplib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/posixfile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/posixpath.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pprint.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/profile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pstats.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pty.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/py_compile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pyclbr.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/pydoc.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/quopri.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/random.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/re.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/repr.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/rexec.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/rfc822.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/rlcompleter.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/robotparser.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/runpy.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sched.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sets.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sgmllib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sha.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/shelve.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/shlex.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/shutil.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/site.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/smtpd.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/smtplib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sndhdr.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/socket.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sre.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sre_compile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sre_constants.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sre_parse.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/stat.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/statvfs.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/string.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/stringold.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/stringprep.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/struct.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/subprocess.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sunau.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/sunaudio.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/symbol.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/symtable.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/tabnanny.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/tarfile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/telnetlib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/tempfile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/textwrap.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/this.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/threading.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/timeit.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/toaiff.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/token.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/tokenize.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/trace.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/traceback.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/tty.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/types.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/unittest.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/urllib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/urllib2.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/urlparse.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/user.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c ./Lib/uu.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/uuid.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/warnings.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/wave.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/weakref.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/webbrowser.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/whichdb.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/xdrlib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/xmllib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/xmlrpclib.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/zipfile.py /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/pdb.doc /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/wsgiref.egg-info /tmp/python-test/local/lib/python2.6 /usr/bin/install -c -m 644 ./Lib/lib-tk/Canvas.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/Dialog.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/FileDialog.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/FixTk.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/ScrolledText.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/SimpleDialog.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c ./Lib/lib-tk/Tix.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/Tkconstants.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/Tkdnd.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/Tkinter.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/tkColorChooser.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/tkCommonDialog.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/tkFileDialog.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/tkFont.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/tkMessageBox.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/tkSimpleDialog.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/lib-tk/turtle.py /tmp/python-test/local/lib/python2.6/lib-tk /usr/bin/install -c -m 644 ./Lib/site-packages/README /tmp/python-test/local/lib/python2.6/site-packages /usr/bin/install -c -m 644 ./Lib/test/185test.db /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/README /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/__init__.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/audiotest.au /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/autotest.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/bad_coding.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/bad_coding2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future3.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future4.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future5.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future6.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future7.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future8.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_future9.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/badsyntax_nocaret.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/cfgparser.1 /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/check_soundcard.vbs /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/cjkencodings_test.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/doctest_aliases.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/double_const.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/empty.vbs /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/exception_hierarchy.txt /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/fork_wait.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/greyrgb.uue /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/infinite_reload.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/inspect_fodder.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/inspect_fodder2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/list_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/mapping_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/outstanding_bugs.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/pickletester.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/pyclbr_input.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/pydocfodder.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/pystone.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/re_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/regex_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/regrtest.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/reperf.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/sample_doctest.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/seq_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/sgml_input.html /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/sortperf.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/ssl_cert.pem /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/ssl_key.pem /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/string_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test.xml /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test.xml.out /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_MimeWriter.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_StringIO.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test___all__.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test___future__.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test__locale.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_aepack.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_al.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_anydbm.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_applesingle.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_array.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ast.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_asynchat.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_atexit.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_audioop.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_augassign.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_base64.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bastion.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bigaddrspace.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bigmem.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_binascii.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_binhex.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_binop.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bisect.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bool.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_bsddb.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bsddb185.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bsddb3.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bufio.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_builtin.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_bz2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cProfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_calendar.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_call.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_capi.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_cd.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cfgparser.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cgi.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_charmapcodec.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_cl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_class.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_cmath.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cmd_line.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_code.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codeccallbacks.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecencodings_cn.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecencodings_hk.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecencodings_jp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecencodings_kr.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecencodings_tw.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecmaps_cn.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecmaps_hk.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecmaps_jp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecmaps_kr.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecmaps_tw.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codecs.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_codeop.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_coding.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_coercion.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_collections.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_colorsys.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_commands.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_compare.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_compile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_compiler.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_complex.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_complex_args.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_contains.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_contextlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cookie.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cookielib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_copy.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_copy_reg.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_cpickle.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_crypt.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_csv.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ctypes.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_curses.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_datetime.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_dbm.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_decimal.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_decorators.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_defaultdict.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_deque.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_descr.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_descrtut.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_dict.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_difflib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_difflib_expect.html /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_dircache.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_dis.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_distutils.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_dl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_doctest.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_doctest.txt /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_doctest2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_doctest2.txt /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_doctest3.txt /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_doctest4.txt /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_dumbdbm.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_dummy_thread.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_dummy_threading.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_email.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_email_codecs.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_email_renamed.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_enumerate.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_eof.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_errno.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_exception_variations.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_exceptions.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_extcall.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_fcntl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_file.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_filecmp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_fileinput.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_float.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_fnmatch.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_fork1.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_format.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_fpformat.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_frozen.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ftplib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_funcattrs.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_functools.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_future.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_future1.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_future2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_future3.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_gc.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_gdbm.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_generators.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_genericpath.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_genexps.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_getargs.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_getargs2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_getopt.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_gettext.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_gl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_glob.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_global.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_grammar.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_grp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_gzip.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_hash.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_hashlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_heapq.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_hexoct.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_hmac.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_hotshot.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_htmllib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_htmlparser.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_httplib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_imageop.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_imaplib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_imgfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_imp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_import.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_importhooks.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_index.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_inspect.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ioctl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_isinstance.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_iter.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_iterlen.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_itertools.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_largefile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_linuxaudiodev.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_list.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_locale.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_logging.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_long.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_long_future.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_longexp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_macostools.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_macpath.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_mailbox.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_marshal.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_math.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_md5.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_mhlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_mimetools.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_mimetypes.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_minidom.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_mmap.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_module.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_modulefinder.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_multibytecodec.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_multibytecodec_support.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_multifile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_mutants.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_netrc.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_new.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_nis.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_normalization.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ntpath.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_old_mailbox.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_opcodes.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_openpty.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_operator.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_optparse.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_os.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ossaudiodev.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_parser.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_peepholer.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pep247.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pep263.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pep277.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pep292.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pep352.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pickle.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pickletools.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pkg.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pkgimport.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_platform.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_plistlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_poll.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_popen.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_popen2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_poplib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_posix.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_posixpath.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pow.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pprint.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_profile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_profilehooks.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pty.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pwd.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pyclbr.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_pyexpat.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_queue.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_quopri.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_random.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_re.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_repr.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_resource.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_rfc822.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_richcmp.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_robotparser.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_runpy.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sax.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_scope.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_scriptpackages.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_select.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_set.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sets.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sgmllib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sha.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_shelve.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_shlex.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_shutil.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_signal.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_site.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_slice.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_smtplib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_socket.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_socket_ssl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_socketserver.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_softspace.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sort.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sqlite.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_startfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_str.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_strftime.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_string.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_stringprep.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_strop.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_strptime.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_struct.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_structmembers.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_structseq.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_subprocess.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sunaudiodev.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sundry.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_support.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_symtable.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_syntax.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_sys.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_tarfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_tcl.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_telnetlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_tempfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_textwrap.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_thread.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_threaded_import.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_threadedtempfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_threading.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_threading_local.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_threadsignals.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_time.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_timeout.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_tokenize.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_trace.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_traceback.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_transformer.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_tuple.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_types.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_ucn.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_unary.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_unicode.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_unicode_file.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_unicodedata.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_unittest.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_univnewlines.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_unpack.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_urllib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_urllib2.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_urllib2net.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_urllibnet.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_urlparse.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_userdict.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_userlist.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_userstring.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_uu.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_uuid.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_wait3.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_wait4.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_warnings.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_wave.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_weakref.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_whichdb.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_winreg.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_winsound.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_with.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c ./Lib/test/test_wsgiref.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xdrlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xml_etree.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xml_etree_c.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xmllib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xmlrpc.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xpickle.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_xrange.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_zipfile.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_zipfile64.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_zipimport.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/test_zlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/testall.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/testcodec.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/testimg.uue /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/testimgr.uue /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/testrgb.uue /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/testtar.tar /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/tf_inherit_check.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/threaded_import_hangers.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/time_hashlib.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/tokenize_tests.txt /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/warning_tests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/xmltests.py /tmp/python-test/local/lib/python2.6/test /usr/bin/install -c -m 644 ./Lib/test/output/test_cProfile /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_class /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_extcall /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_frozen /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_linuxaudiodev /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_logging /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_ossaudiodev /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_pep277 /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_pkg /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_profile /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_rgbimg /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_signal /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_thread /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_tokenize /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/output/test_winreg /tmp/python-test/local/lib/python2.6/test/output /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/abs.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/add.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/base.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/clamp.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/compare.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/decimal128.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/decimal32.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/decimal64.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/divide.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/divideint.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/inexact.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/max.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/min.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/minus.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/multiply.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/normalize.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/plus.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/power.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/quantize.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/randomBound32.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/randoms.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/remainder.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/remainderNear.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/rescale.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/rounding.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/samequantum.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/squareroot.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/subtract.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/testall.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/test/decimaltestdata/tointegral.decTest /tmp/python-test/local/lib/python2.6/test/decimaltestdata /usr/bin/install -c -m 644 ./Lib/encodings/__init__.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/aliases.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/ascii.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/base64_codec.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/big5.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/big5hkscs.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/bz2_codec.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/charmap.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp037.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1006.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1026.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1140.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1250.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1251.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1252.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1253.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1254.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1255.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1256.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1257.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp1258.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp424.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp437.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp500.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp737.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp775.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp850.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp852.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp855.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp856.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp857.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp860.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp861.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp862.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp863.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp864.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp865.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp866.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp869.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp874.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp875.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp932.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp949.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/cp950.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/euc_jis_2004.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/euc_jisx0213.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/euc_jp.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/euc_kr.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/gb18030.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/gb2312.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/gbk.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/hex_codec.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/hp_roman8.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/hz.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/idna.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_jp.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_jp_1.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_jp_2.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_jp_2004.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_jp_3.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_jp_ext.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso2022_kr.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_1.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_10.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_11.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_13.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_14.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_15.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_16.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_2.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_3.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_4.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_5.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_6.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_7.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_8.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/iso8859_9.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/johab.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/koi8_r.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/koi8_u.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/latin_1.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_arabic.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_centeuro.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_croatian.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_cyrillic.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_farsi.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_greek.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_iceland.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_latin2.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_roman.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_romanian.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mac_turkish.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/mbcs.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/palmos.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/ptcp154.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/punycode.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/quopri_codec.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/raw_unicode_escape.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/rot_13.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/shift_jis.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/shift_jis_2004.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/shift_jisx0213.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/string_escape.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/tis_620.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/undefined.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/unicode_escape.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/unicode_internal.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/utf_16.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/utf_16_be.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/utf_16_le.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/utf_7.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/utf_8.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/utf_8_sig.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/uu_codec.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/encodings/zlib_codec.py /tmp/python-test/local/lib/python2.6/encodings /usr/bin/install -c -m 644 ./Lib/compiler/__init__.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/ast.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/consts.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/future.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/misc.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/pyassem.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/pycodegen.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/symbols.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/syntax.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/transformer.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/compiler/visitor.py /tmp/python-test/local/lib/python2.6/compiler /usr/bin/install -c -m 644 ./Lib/hotshot/__init__.py /tmp/python-test/local/lib/python2.6/hotshot /usr/bin/install -c -m 644 ./Lib/hotshot/log.py /tmp/python-test/local/lib/python2.6/hotshot /usr/bin/install -c -m 644 ./Lib/hotshot/stats.py /tmp/python-test/local/lib/python2.6/hotshot /usr/bin/install -c -m 644 ./Lib/hotshot/stones.py /tmp/python-test/local/lib/python2.6/hotshot /usr/bin/install -c -m 644 ./Lib/email/__init__.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/_parseaddr.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/base64mime.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/charset.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/encoders.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/errors.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/feedparser.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/generator.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/header.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/iterators.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/message.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/parser.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/quoprimime.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/utils.py /tmp/python-test/local/lib/python2.6/email /usr/bin/install -c -m 644 ./Lib/email/mime/__init__.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/application.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/audio.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/base.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/image.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/message.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/multipart.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/nonmultipart.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/mime/text.py /tmp/python-test/local/lib/python2.6/email/mime /usr/bin/install -c -m 644 ./Lib/email/test/__init__.py /tmp/python-test/local/lib/python2.6/email/test /usr/bin/install -c -m 644 ./Lib/email/test/test_email.py /tmp/python-test/local/lib/python2.6/email/test /usr/bin/install -c -m 644 ./Lib/email/test/test_email_codecs.py /tmp/python-test/local/lib/python2.6/email/test /usr/bin/install -c -m 644 ./Lib/email/test/test_email_codecs_renamed.py /tmp/python-test/local/lib/python2.6/email/test /usr/bin/install -c -m 644 ./Lib/email/test/test_email_renamed.py /tmp/python-test/local/lib/python2.6/email/test /usr/bin/install -c -m 644 ./Lib/email/test/test_email_torture.py /tmp/python-test/local/lib/python2.6/email/test /usr/bin/install -c -m 644 ./Lib/email/test/data/PyBanner048.gif /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/audiotest.au /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_01.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_02.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_03.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_04.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_05.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_06.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_07.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_08.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_09.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_10.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_11.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_12.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_12a.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_13.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_14.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_15.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_16.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_17.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_18.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_19.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_20.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_21.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_22.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_23.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_24.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_25.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_26.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_27.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_28.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_29.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_30.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_31.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_32.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_33.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_34.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_35.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_36.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_37.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_38.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_39.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_40.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_41.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_42.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_43.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/email/test/data/msg_44.txt /tmp/python-test/local/lib/python2.6/email/test/data /usr/bin/install -c -m 644 ./Lib/sqlite3/__init__.py /tmp/python-test/local/lib/python2.6/sqlite3 /usr/bin/install -c -m 644 ./Lib/sqlite3/dbapi2.py /tmp/python-test/local/lib/python2.6/sqlite3 /usr/bin/install -c -m 644 ./Lib/sqlite3/test/__init__.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/dbapi.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/factory.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/hooks.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/regression.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/transactions.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/types.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/sqlite3/test/userfunctions.py /tmp/python-test/local/lib/python2.6/sqlite3/test /usr/bin/install -c -m 644 ./Lib/logging/__init__.py /tmp/python-test/local/lib/python2.6/logging /usr/bin/install -c -m 644 ./Lib/logging/config.py /tmp/python-test/local/lib/python2.6/logging /usr/bin/install -c -m 644 ./Lib/logging/handlers.py /tmp/python-test/local/lib/python2.6/logging /usr/bin/install -c -m 644 ./Lib/bsddb/__init__.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/db.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/dbobj.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/dbrecio.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/dbshelve.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/dbtables.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/dbutils.py /tmp/python-test/local/lib/python2.6/bsddb /usr/bin/install -c -m 644 ./Lib/bsddb/test/__init__.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_1413192.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_all.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_associate.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_basics.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_compare.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_compat.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_cursor_pget_bug.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_dbobj.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_dbshelve.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_dbtables.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_env_close.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_get_none.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_join.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_lock.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_misc.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_pickle.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_queue.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_recno.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_sequence.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/bsddb/test/test_thread.py /tmp/python-test/local/lib/python2.6/bsddb/test /usr/bin/install -c -m 644 ./Lib/wsgiref/__init__.py /tmp/python-test/local/lib/python2.6/wsgiref /usr/bin/install -c -m 644 ./Lib/wsgiref/handlers.py /tmp/python-test/local/lib/python2.6/wsgiref /usr/bin/install -c -m 644 ./Lib/wsgiref/headers.py /tmp/python-test/local/lib/python2.6/wsgiref /usr/bin/install -c -m 644 ./Lib/wsgiref/simple_server.py /tmp/python-test/local/lib/python2.6/wsgiref /usr/bin/install -c -m 644 ./Lib/wsgiref/util.py /tmp/python-test/local/lib/python2.6/wsgiref /usr/bin/install -c -m 644 ./Lib/wsgiref/validate.py /tmp/python-test/local/lib/python2.6/wsgiref /usr/bin/install -c -m 644 ./Lib/ctypes/__init__.py /tmp/python-test/local/lib/python2.6/ctypes /usr/bin/install -c -m 644 ./Lib/ctypes/_endian.py /tmp/python-test/local/lib/python2.6/ctypes /usr/bin/install -c -m 644 ./Lib/ctypes/util.py /tmp/python-test/local/lib/python2.6/ctypes /usr/bin/install -c -m 644 ./Lib/ctypes/wintypes.py /tmp/python-test/local/lib/python2.6/ctypes /usr/bin/install -c -m 644 ./Lib/ctypes/test/__init__.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/runtests.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_anon.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_array_in_pointer.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_arrays.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_as_parameter.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_bitfields.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_buffers.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_byteswap.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_callbacks.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_cast.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_cfuncs.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_checkretval.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_errcheck.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_find.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_funcptr.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_functions.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_incomplete.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_init.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_integers.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_internals.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_keeprefs.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_libc.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_loading.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_macholib.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_memfunctions.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_numbers.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_objects.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_parameters.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_pointers.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_prototypes.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_python_api.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_random_things.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_refcounts.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_repr.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_returnfuncptrs.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_simplesubclasses.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_sizes.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_slicing.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_stringptr.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_strings.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_struct_fields.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_structures.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_unaligned_structures.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_unicode.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_values.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_varsize_struct.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/test/test_win32.py /tmp/python-test/local/lib/python2.6/ctypes/test /usr/bin/install -c -m 644 ./Lib/ctypes/macholib/README.ctypes /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c -m 644 ./Lib/ctypes/macholib/__init__.py /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c -m 644 ./Lib/ctypes/macholib/dyld.py /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c -m 644 ./Lib/ctypes/macholib/dylib.py /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c ./Lib/ctypes/macholib/fetch_macholib /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c -m 644 ./Lib/ctypes/macholib/fetch_macholib.bat /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c -m 644 ./Lib/ctypes/macholib/framework.py /tmp/python-test/local/lib/python2.6/ctypes/macholib /usr/bin/install -c -m 644 ./Lib/idlelib/AutoComplete.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/AutoCompleteWindow.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/AutoExpand.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/Bindings.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/CREDITS.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/CallTipWindow.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/CallTips.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ChangeLog /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ClassBrowser.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/CodeContext.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ColorDelegator.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/Debugger.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/Delegator.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/EditorWindow.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/FileList.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/FormatParagraph.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/GrepDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/HISTORY.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/HyperParser.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/IOBinding.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/IdleHistory.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/MultiCall.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/MultiStatusBar.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/NEWS.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ObjectBrowser.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/OutputWindow.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ParenMatch.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/PathBrowser.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/Percolator.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/PyParse.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/PyShell.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/README.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/RemoteDebugger.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/RemoteObjectBrowser.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ReplaceDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ScriptBinding.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ScrolledList.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/SearchDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/SearchDialogBase.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/SearchEngine.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/StackViewer.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/TODO.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ToolTip.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/TreeWidget.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/UndoDelegator.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/WidgetRedirector.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/WindowList.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/ZoomHeight.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/__init__.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/aboutDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/config-extensions.def /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/config-highlight.def /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/config-keys.def /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/config-main.def /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/configDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/configHandler.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/configHelpSourceEdit.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/configSectionNameDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/dynOptionMenuWidget.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/extend.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/help.txt /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c ./Lib/idlelib/idle.bat /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/idle.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/idle.pyw /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/idlever.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/keybindingDialog.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/macosxSupport.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/rpc.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/run.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/tabpage.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/testcode.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/textView.py /tmp/python-test/local/lib/python2.6/idlelib /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/folder.gif /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/idle.icns /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/minusnode.gif /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/openfolder.gif /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/plusnode.gif /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/python.gif /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/idlelib/Icons/tk.gif /tmp/python-test/local/lib/python2.6/idlelib/Icons /usr/bin/install -c -m 644 ./Lib/distutils/README /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/__init__.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/archive_util.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/bcppcompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/ccompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/cmd.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/core.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/cygwinccompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/debug.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/dep_util.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/dir_util.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/dist.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/emxccompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/errors.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/extension.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/fancy_getopt.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/file_util.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/filelist.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/log.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/msvccompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/mwerkscompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/spawn.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/sysconfig.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/text_file.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/unixccompiler.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/util.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/version.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/versionpredicate.py /tmp/python-test/local/lib/python2.6/distutils /usr/bin/install -c -m 644 ./Lib/distutils/command/__init__.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/bdist.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/bdist_dumb.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/bdist_msi.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/bdist_rpm.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/bdist_wininst.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/build.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/build_clib.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/build_ext.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/build_py.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/build_scripts.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/clean.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/command_template /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/config.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/install.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/install_data.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/install_egg_info.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/install_headers.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/install_lib.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/install_scripts.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/register.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/sdist.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/upload.py /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/wininst-6.exe /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/wininst-7.1.exe /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/command/wininst-8.exe /tmp/python-test/local/lib/python2.6/distutils/command /usr/bin/install -c -m 644 ./Lib/distutils/tests/__init__.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/support.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/test_build_py.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/test_build_scripts.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/test_dist.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/test_install.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/test_install_scripts.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/distutils/tests/test_versionpredicate.py /tmp/python-test/local/lib/python2.6/distutils/tests /usr/bin/install -c -m 644 ./Lib/xml/__init__.py /tmp/python-test/local/lib/python2.6/xml /usr/bin/install -c -m 644 ./Lib/xml/dom/NodeFilter.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/__init__.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/domreg.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/expatbuilder.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/minicompat.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/minidom.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/pulldom.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/dom/xmlbuilder.py /tmp/python-test/local/lib/python2.6/xml/dom /usr/bin/install -c -m 644 ./Lib/xml/etree/ElementInclude.py /tmp/python-test/local/lib/python2.6/xml/etree /usr/bin/install -c -m 644 ./Lib/xml/etree/ElementPath.py /tmp/python-test/local/lib/python2.6/xml/etree /usr/bin/install -c -m 644 ./Lib/xml/etree/ElementTree.py /tmp/python-test/local/lib/python2.6/xml/etree /usr/bin/install -c -m 644 ./Lib/xml/etree/__init__.py /tmp/python-test/local/lib/python2.6/xml/etree /usr/bin/install -c -m 644 ./Lib/xml/etree/cElementTree.py /tmp/python-test/local/lib/python2.6/xml/etree /usr/bin/install -c -m 644 ./Lib/xml/parsers/__init__.py /tmp/python-test/local/lib/python2.6/xml/parsers /usr/bin/install -c -m 644 ./Lib/xml/parsers/expat.py /tmp/python-test/local/lib/python2.6/xml/parsers /usr/bin/install -c -m 644 ./Lib/xml/sax/__init__.py /tmp/python-test/local/lib/python2.6/xml/sax /usr/bin/install -c -m 644 ./Lib/xml/sax/_exceptions.py /tmp/python-test/local/lib/python2.6/xml/sax /usr/bin/install -c -m 644 ./Lib/xml/sax/expatreader.py /tmp/python-test/local/lib/python2.6/xml/sax /usr/bin/install -c -m 644 ./Lib/xml/sax/handler.py /tmp/python-test/local/lib/python2.6/xml/sax /usr/bin/install -c -m 644 ./Lib/xml/sax/saxutils.py /tmp/python-test/local/lib/python2.6/xml/sax /usr/bin/install -c -m 644 ./Lib/xml/sax/xmlreader.py /tmp/python-test/local/lib/python2.6/xml/sax /usr/bin/install -c -m 644 ./Lib/curses/__init__.py /tmp/python-test/local/lib/python2.6/curses /usr/bin/install -c -m 644 ./Lib/curses/ascii.py /tmp/python-test/local/lib/python2.6/curses /usr/bin/install -c -m 644 ./Lib/curses/has_key.py /tmp/python-test/local/lib/python2.6/curses /usr/bin/install -c -m 644 ./Lib/curses/panel.py /tmp/python-test/local/lib/python2.6/curses /usr/bin/install -c -m 644 ./Lib/curses/textpad.py /tmp/python-test/local/lib/python2.6/curses /usr/bin/install -c -m 644 ./Lib/curses/wrapper.py /tmp/python-test/local/lib/python2.6/curses /usr/bin/install -c -m 644 ./Lib/plat-linux2/CDROM.py /tmp/python-test/local/lib/python2.6/plat-linux2 /usr/bin/install -c -m 644 ./Lib/plat-linux2/DLFCN.py /tmp/python-test/local/lib/python2.6/plat-linux2 /usr/bin/install -c -m 644 ./Lib/plat-linux2/IN.py /tmp/python-test/local/lib/python2.6/plat-linux2 /usr/bin/install -c -m 644 ./Lib/plat-linux2/TYPES.py /tmp/python-test/local/lib/python2.6/plat-linux2 /usr/bin/install -c ./Lib/plat-linux2/regen /tmp/python-test/local/lib/python2.6/plat-linux2 /usr/bin/install -c -m 644 ./LICENSE /tmp/python-test/local/lib/python2.6/LICENSE.txt PYTHONPATH=/tmp/python-test/local/lib/python2.6 \ ./python -Wi -tt /tmp/python-test/local/lib/python2.6/compileall.py \ -d /tmp/python-test/local/lib/python2.6 -f \ -x 'bad_coding|badsyntax|site-packages' /tmp/python-test/local/lib/python2.6 Listing /tmp/python-test/local/lib/python2.6 ... Compiling /tmp/python-test/local/lib/python2.6/BaseHTTPServer.py ... Compiling /tmp/python-test/local/lib/python2.6/Bastion.py ... Compiling /tmp/python-test/local/lib/python2.6/CGIHTTPServer.py ... Compiling /tmp/python-test/local/lib/python2.6/ConfigParser.py ... Compiling /tmp/python-test/local/lib/python2.6/Cookie.py ... Compiling /tmp/python-test/local/lib/python2.6/DocXMLRPCServer.py ... Compiling /tmp/python-test/local/lib/python2.6/HTMLParser.py ... Compiling /tmp/python-test/local/lib/python2.6/MimeWriter.py ... Compiling /tmp/python-test/local/lib/python2.6/Queue.py ... Compiling /tmp/python-test/local/lib/python2.6/SimpleHTTPServer.py ... Compiling /tmp/python-test/local/lib/python2.6/SimpleXMLRPCServer.py ... Compiling /tmp/python-test/local/lib/python2.6/SocketServer.py ... Compiling /tmp/python-test/local/lib/python2.6/StringIO.py ... Compiling /tmp/python-test/local/lib/python2.6/UserDict.py ... Compiling /tmp/python-test/local/lib/python2.6/UserList.py ... Compiling /tmp/python-test/local/lib/python2.6/UserString.py ... Compiling /tmp/python-test/local/lib/python2.6/_LWPCookieJar.py ... Compiling /tmp/python-test/local/lib/python2.6/_MozillaCookieJar.py ... Compiling /tmp/python-test/local/lib/python2.6/__future__.py ... Compiling /tmp/python-test/local/lib/python2.6/__phello__.foo.py ... Compiling /tmp/python-test/local/lib/python2.6/_strptime.py ... Compiling /tmp/python-test/local/lib/python2.6/_threading_local.py ... Compiling /tmp/python-test/local/lib/python2.6/aifc.py ... Compiling /tmp/python-test/local/lib/python2.6/anydbm.py ... Compiling /tmp/python-test/local/lib/python2.6/asynchat.py ... Compiling /tmp/python-test/local/lib/python2.6/asyncore.py ... Compiling /tmp/python-test/local/lib/python2.6/atexit.py ... Compiling /tmp/python-test/local/lib/python2.6/audiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/base64.py ... Compiling /tmp/python-test/local/lib/python2.6/bdb.py ... Compiling /tmp/python-test/local/lib/python2.6/binhex.py ... Compiling /tmp/python-test/local/lib/python2.6/bisect.py ... Listing /tmp/python-test/local/lib/python2.6/bsddb ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/db.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbobj.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbrecio.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbshelve.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbtables.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbutils.py ... Listing /tmp/python-test/local/lib/python2.6/bsddb/test ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_1413192.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_all.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_associate.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_basics.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_compare.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_compat.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_cursor_pget_bug.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_dbobj.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_dbshelve.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_dbtables.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_env_close.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_get_none.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_join.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_lock.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_misc.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_pickle.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_queue.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_recno.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_sequence.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/cProfile.py ... Compiling /tmp/python-test/local/lib/python2.6/calendar.py ... Compiling /tmp/python-test/local/lib/python2.6/cgi.py ... Compiling /tmp/python-test/local/lib/python2.6/cgitb.py ... Compiling /tmp/python-test/local/lib/python2.6/chunk.py ... Compiling /tmp/python-test/local/lib/python2.6/cmd.py ... Compiling /tmp/python-test/local/lib/python2.6/code.py ... Compiling /tmp/python-test/local/lib/python2.6/codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/codeop.py ... Compiling /tmp/python-test/local/lib/python2.6/collections.py ... Compiling /tmp/python-test/local/lib/python2.6/colorsys.py ... Compiling /tmp/python-test/local/lib/python2.6/commands.py ... Compiling /tmp/python-test/local/lib/python2.6/compileall.py ... Listing /tmp/python-test/local/lib/python2.6/compiler ... Compiling /tmp/python-test/local/lib/python2.6/compiler/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/ast.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/consts.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/future.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/misc.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/pyassem.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/pycodegen.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/symbols.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/syntax.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/transformer.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/visitor.py ... Compiling /tmp/python-test/local/lib/python2.6/contextlib.py ... Compiling /tmp/python-test/local/lib/python2.6/cookielib.py ... Compiling /tmp/python-test/local/lib/python2.6/copy.py ... Compiling /tmp/python-test/local/lib/python2.6/copy_reg.py ... Compiling /tmp/python-test/local/lib/python2.6/csv.py ... Listing /tmp/python-test/local/lib/python2.6/ctypes ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/_endian.py ... Listing /tmp/python-test/local/lib/python2.6/ctypes/macholib ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/dyld.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/dylib.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/framework.py ... Listing /tmp/python-test/local/lib/python2.6/ctypes/test ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/runtests.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_anon.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_array_in_pointer.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_arrays.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_as_parameter.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_bitfields.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_buffers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_byteswap.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_callbacks.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_cast.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_cfuncs.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_checkretval.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_errcheck.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_find.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_funcptr.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_functions.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_incomplete.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_init.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_integers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_internals.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_keeprefs.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_libc.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_loading.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_macholib.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_memfunctions.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_numbers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_objects.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_parameters.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_pointers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_prototypes.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_python_api.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_random_things.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_refcounts.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_repr.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_returnfuncptrs.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_simplesubclasses.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_sizes.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_slicing.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_stringptr.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_strings.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_struct_fields.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_structures.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_unaligned_structures.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_unicode.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_values.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_varsize_struct.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_win32.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/util.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/wintypes.py ... Listing /tmp/python-test/local/lib/python2.6/curses ... Compiling /tmp/python-test/local/lib/python2.6/curses/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/ascii.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/has_key.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/panel.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/textpad.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/wrapper.py ... Compiling /tmp/python-test/local/lib/python2.6/dbhash.py ... Compiling /tmp/python-test/local/lib/python2.6/decimal.py ... Compiling /tmp/python-test/local/lib/python2.6/difflib.py ... Compiling /tmp/python-test/local/lib/python2.6/dircache.py ... Compiling /tmp/python-test/local/lib/python2.6/dis.py ... Listing /tmp/python-test/local/lib/python2.6/distutils ... Compiling /tmp/python-test/local/lib/python2.6/distutils/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/archive_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/bcppcompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/ccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/cmd.py ... Listing /tmp/python-test/local/lib/python2.6/distutils/command ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_dumb.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_msi.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_rpm.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_wininst.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_clib.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_ext.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_py.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/clean.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/config.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_data.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_egg_info.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_headers.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_lib.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/register.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/sdist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/upload.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/core.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/cygwinccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/debug.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/dep_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/dir_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/dist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/emxccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/errors.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/extension.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/fancy_getopt.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/file_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/filelist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/log.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/msvccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/mwerkscompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/spawn.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/sysconfig.py ... Listing /tmp/python-test/local/lib/python2.6/distutils/tests ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/support.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_build_py.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_build_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_dist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_install.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_install_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_versionpredicate.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/text_file.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/unixccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/version.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/versionpredicate.py ... Compiling /tmp/python-test/local/lib/python2.6/doctest.py ... Compiling /tmp/python-test/local/lib/python2.6/dumbdbm.py ... Compiling /tmp/python-test/local/lib/python2.6/dummy_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/dummy_threading.py ... Listing /tmp/python-test/local/lib/python2.6/email ... Compiling /tmp/python-test/local/lib/python2.6/email/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/email/_parseaddr.py ... Compiling /tmp/python-test/local/lib/python2.6/email/base64mime.py ... Compiling /tmp/python-test/local/lib/python2.6/email/charset.py ... Compiling /tmp/python-test/local/lib/python2.6/email/encoders.py ... Compiling /tmp/python-test/local/lib/python2.6/email/errors.py ... Compiling /tmp/python-test/local/lib/python2.6/email/feedparser.py ... Compiling /tmp/python-test/local/lib/python2.6/email/generator.py ... Compiling /tmp/python-test/local/lib/python2.6/email/header.py ... Compiling /tmp/python-test/local/lib/python2.6/email/iterators.py ... Compiling /tmp/python-test/local/lib/python2.6/email/message.py ... Listing /tmp/python-test/local/lib/python2.6/email/mime ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/application.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/audio.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/base.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/image.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/message.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/multipart.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/nonmultipart.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/text.py ... Compiling /tmp/python-test/local/lib/python2.6/email/parser.py ... Compiling /tmp/python-test/local/lib/python2.6/email/quoprimime.py ... Listing /tmp/python-test/local/lib/python2.6/email/test ... Compiling /tmp/python-test/local/lib/python2.6/email/test/__init__.py ... Listing /tmp/python-test/local/lib/python2.6/email/test/data ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_codecs_renamed.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_renamed.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_torture.py ... Compiling /tmp/python-test/local/lib/python2.6/email/utils.py ... Listing /tmp/python-test/local/lib/python2.6/encodings ... Compiling /tmp/python-test/local/lib/python2.6/encodings/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/aliases.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/ascii.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/base64_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/big5.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/big5hkscs.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/bz2_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/charmap.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp037.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1006.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1026.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1140.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1250.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1251.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1252.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1253.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1254.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1255.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1256.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1257.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1258.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp424.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp437.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp500.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp737.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp775.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp850.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp852.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp855.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp856.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp857.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp860.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp861.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp862.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp863.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp864.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp865.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp866.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp869.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp874.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp875.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp932.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp949.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp950.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_jis_2004.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_jisx0213.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/gb18030.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/gb2312.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/gbk.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/hex_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/hp_roman8.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/hz.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/idna.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_1.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_2.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_2004.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_3.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_ext.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_1.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_10.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_11.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_13.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_14.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_15.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_16.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_2.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_3.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_4.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_5.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_6.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_7.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_8.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_9.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/johab.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/koi8_r.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/koi8_u.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/latin_1.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_arabic.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_centeuro.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_croatian.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_cyrillic.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_farsi.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_greek.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_iceland.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_latin2.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_roman.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_romanian.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_turkish.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mbcs.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/palmos.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/ptcp154.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/punycode.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/quopri_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/raw_unicode_escape.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/rot_13.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/shift_jis.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/shift_jis_2004.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/shift_jisx0213.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/string_escape.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/tis_620.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/undefined.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/unicode_escape.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/unicode_internal.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_16.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_16_be.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_16_le.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_7.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_8.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_8_sig.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/uu_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/zlib_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/filecmp.py ... Compiling /tmp/python-test/local/lib/python2.6/fileinput.py ... Compiling /tmp/python-test/local/lib/python2.6/fnmatch.py ... Compiling /tmp/python-test/local/lib/python2.6/formatter.py ... Compiling /tmp/python-test/local/lib/python2.6/fpformat.py ... Compiling /tmp/python-test/local/lib/python2.6/ftplib.py ... Compiling /tmp/python-test/local/lib/python2.6/functools.py ... Compiling /tmp/python-test/local/lib/python2.6/genericpath.py ... Compiling /tmp/python-test/local/lib/python2.6/getopt.py ... Compiling /tmp/python-test/local/lib/python2.6/getpass.py ... Compiling /tmp/python-test/local/lib/python2.6/gettext.py ... Compiling /tmp/python-test/local/lib/python2.6/glob.py ... Compiling /tmp/python-test/local/lib/python2.6/gzip.py ... Compiling /tmp/python-test/local/lib/python2.6/hashlib.py ... Compiling /tmp/python-test/local/lib/python2.6/heapq.py ... Compiling /tmp/python-test/local/lib/python2.6/hmac.py ... Listing /tmp/python-test/local/lib/python2.6/hotshot ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/log.py ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/stats.py ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/stones.py ... Compiling /tmp/python-test/local/lib/python2.6/htmlentitydefs.py ... Compiling /tmp/python-test/local/lib/python2.6/htmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/httplib.py ... Listing /tmp/python-test/local/lib/python2.6/idlelib ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/AutoComplete.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/AutoCompleteWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/AutoExpand.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Bindings.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/CallTipWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/CallTips.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ClassBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/CodeContext.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ColorDelegator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Debugger.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Delegator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/EditorWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/FileList.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/FormatParagraph.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/GrepDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/HyperParser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/IOBinding.py ... Listing /tmp/python-test/local/lib/python2.6/idlelib/Icons ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/IdleHistory.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/MultiCall.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/MultiStatusBar.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ObjectBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/OutputWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ParenMatch.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/PathBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Percolator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/PyParse.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/PyShell.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/RemoteDebugger.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/RemoteObjectBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ReplaceDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ScriptBinding.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ScrolledList.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/SearchDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/SearchDialogBase.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/SearchEngine.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/StackViewer.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ToolTip.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/TreeWidget.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/UndoDelegator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/WidgetRedirector.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/WindowList.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ZoomHeight.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/aboutDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configHandler.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configHelpSourceEdit.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configSectionNameDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/dynOptionMenuWidget.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/idle.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/idlever.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/keybindingDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/macosxSupport.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/rpc.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/run.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/tabpage.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/testcode.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/textView.py ... Compiling /tmp/python-test/local/lib/python2.6/ihooks.py ... Compiling /tmp/python-test/local/lib/python2.6/imaplib.py ... Compiling /tmp/python-test/local/lib/python2.6/imghdr.py ... Compiling /tmp/python-test/local/lib/python2.6/imputil.py ... Compiling /tmp/python-test/local/lib/python2.6/inspect.py ... Compiling /tmp/python-test/local/lib/python2.6/keyword.py ... Listing /tmp/python-test/local/lib/python2.6/lib-tk ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Canvas.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Dialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/FileDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/FixTk.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/ScrolledText.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/SimpleDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tix.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tkconstants.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tkdnd.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tkinter.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkColorChooser.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkCommonDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkFileDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkFont.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkMessageBox.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkSimpleDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/turtle.py ... Compiling /tmp/python-test/local/lib/python2.6/linecache.py ... Compiling /tmp/python-test/local/lib/python2.6/locale.py ... Listing /tmp/python-test/local/lib/python2.6/logging ... Compiling /tmp/python-test/local/lib/python2.6/logging/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/logging/config.py ... Compiling /tmp/python-test/local/lib/python2.6/logging/handlers.py ... Compiling /tmp/python-test/local/lib/python2.6/macpath.py ... Compiling /tmp/python-test/local/lib/python2.6/macurl2path.py ... Compiling /tmp/python-test/local/lib/python2.6/mailbox.py ... Compiling /tmp/python-test/local/lib/python2.6/mailcap.py ... Compiling /tmp/python-test/local/lib/python2.6/markupbase.py ... Compiling /tmp/python-test/local/lib/python2.6/md5.py ... Compiling /tmp/python-test/local/lib/python2.6/mhlib.py ... Compiling /tmp/python-test/local/lib/python2.6/mimetools.py ... Compiling /tmp/python-test/local/lib/python2.6/mimetypes.py ... Compiling /tmp/python-test/local/lib/python2.6/mimify.py ... Compiling /tmp/python-test/local/lib/python2.6/modulefinder.py ... Compiling /tmp/python-test/local/lib/python2.6/multifile.py ... Compiling /tmp/python-test/local/lib/python2.6/mutex.py ... Compiling /tmp/python-test/local/lib/python2.6/netrc.py ... Compiling /tmp/python-test/local/lib/python2.6/new.py ... Compiling /tmp/python-test/local/lib/python2.6/nntplib.py ... Compiling /tmp/python-test/local/lib/python2.6/ntpath.py ... Compiling /tmp/python-test/local/lib/python2.6/nturl2path.py ... Compiling /tmp/python-test/local/lib/python2.6/opcode.py ... Compiling /tmp/python-test/local/lib/python2.6/optparse.py ... Compiling /tmp/python-test/local/lib/python2.6/os.py ... Compiling /tmp/python-test/local/lib/python2.6/os2emxpath.py ... Compiling /tmp/python-test/local/lib/python2.6/pdb.py ... Compiling /tmp/python-test/local/lib/python2.6/pickle.py ... Compiling /tmp/python-test/local/lib/python2.6/pickletools.py ... Compiling /tmp/python-test/local/lib/python2.6/pipes.py ... Compiling /tmp/python-test/local/lib/python2.6/pkgutil.py ... Listing /tmp/python-test/local/lib/python2.6/plat-linux2 ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/CDROM.py ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/DLFCN.py ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/IN.py ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/TYPES.py ... Compiling /tmp/python-test/local/lib/python2.6/platform.py ... Compiling /tmp/python-test/local/lib/python2.6/popen2.py ... Compiling /tmp/python-test/local/lib/python2.6/poplib.py ... Compiling /tmp/python-test/local/lib/python2.6/posixfile.py ... Compiling /tmp/python-test/local/lib/python2.6/posixpath.py ... Compiling /tmp/python-test/local/lib/python2.6/pprint.py ... Compiling /tmp/python-test/local/lib/python2.6/profile.py ... Compiling /tmp/python-test/local/lib/python2.6/pstats.py ... Compiling /tmp/python-test/local/lib/python2.6/pty.py ... Compiling /tmp/python-test/local/lib/python2.6/py_compile.py ... Compiling /tmp/python-test/local/lib/python2.6/pyclbr.py ... Compiling /tmp/python-test/local/lib/python2.6/pydoc.py ... Compiling /tmp/python-test/local/lib/python2.6/quopri.py ... Compiling /tmp/python-test/local/lib/python2.6/random.py ... Compiling /tmp/python-test/local/lib/python2.6/re.py ... Compiling /tmp/python-test/local/lib/python2.6/repr.py ... Compiling /tmp/python-test/local/lib/python2.6/rexec.py ... Compiling /tmp/python-test/local/lib/python2.6/rfc822.py ... Compiling /tmp/python-test/local/lib/python2.6/rlcompleter.py ... Compiling /tmp/python-test/local/lib/python2.6/robotparser.py ... Compiling /tmp/python-test/local/lib/python2.6/runpy.py ... Compiling /tmp/python-test/local/lib/python2.6/sched.py ... Compiling /tmp/python-test/local/lib/python2.6/sets.py ... Compiling /tmp/python-test/local/lib/python2.6/sgmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/sha.py ... Compiling /tmp/python-test/local/lib/python2.6/shelve.py ... Compiling /tmp/python-test/local/lib/python2.6/shlex.py ... Compiling /tmp/python-test/local/lib/python2.6/shutil.py ... Compiling /tmp/python-test/local/lib/python2.6/site.py ... Compiling /tmp/python-test/local/lib/python2.6/smtpd.py ... Compiling /tmp/python-test/local/lib/python2.6/smtplib.py ... Compiling /tmp/python-test/local/lib/python2.6/sndhdr.py ... Compiling /tmp/python-test/local/lib/python2.6/socket.py ... Listing /tmp/python-test/local/lib/python2.6/sqlite3 ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/dbapi2.py ... Listing /tmp/python-test/local/lib/python2.6/sqlite3/test ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/dbapi.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/factory.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/hooks.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/regression.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/transactions.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/types.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/userfunctions.py ... Compiling /tmp/python-test/local/lib/python2.6/sre.py ... Compiling /tmp/python-test/local/lib/python2.6/sre_compile.py ... Compiling /tmp/python-test/local/lib/python2.6/sre_constants.py ... Compiling /tmp/python-test/local/lib/python2.6/sre_parse.py ... Compiling /tmp/python-test/local/lib/python2.6/stat.py ... Compiling /tmp/python-test/local/lib/python2.6/statvfs.py ... Compiling /tmp/python-test/local/lib/python2.6/string.py ... Compiling /tmp/python-test/local/lib/python2.6/stringold.py ... Compiling /tmp/python-test/local/lib/python2.6/stringprep.py ... Compiling /tmp/python-test/local/lib/python2.6/struct.py ... Compiling /tmp/python-test/local/lib/python2.6/subprocess.py ... Compiling /tmp/python-test/local/lib/python2.6/sunau.py ... Compiling /tmp/python-test/local/lib/python2.6/sunaudio.py ... Compiling /tmp/python-test/local/lib/python2.6/symbol.py ... Compiling /tmp/python-test/local/lib/python2.6/symtable.py ... Compiling /tmp/python-test/local/lib/python2.6/tabnanny.py ... Compiling /tmp/python-test/local/lib/python2.6/tarfile.py ... Compiling /tmp/python-test/local/lib/python2.6/telnetlib.py ... Compiling /tmp/python-test/local/lib/python2.6/tempfile.py ... Listing /tmp/python-test/local/lib/python2.6/test ... Compiling /tmp/python-test/local/lib/python2.6/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/test/autotest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/cjkencodings_test.py ... Listing /tmp/python-test/local/lib/python2.6/test/decimaltestdata ... Compiling /tmp/python-test/local/lib/python2.6/test/doctest_aliases.py ... Compiling /tmp/python-test/local/lib/python2.6/test/double_const.py ... Compiling /tmp/python-test/local/lib/python2.6/test/fork_wait.py ... Compiling /tmp/python-test/local/lib/python2.6/test/infinite_reload.py ... Compiling /tmp/python-test/local/lib/python2.6/test/inspect_fodder.py ... Compiling /tmp/python-test/local/lib/python2.6/test/inspect_fodder2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/list_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/mapping_tests.py ... Listing /tmp/python-test/local/lib/python2.6/test/output ... Compiling /tmp/python-test/local/lib/python2.6/test/outstanding_bugs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pickletester.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pyclbr_input.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pydocfodder.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pystone.py ... Compiling /tmp/python-test/local/lib/python2.6/test/re_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/regex_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/regrtest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/reperf.py ... Compiling /tmp/python-test/local/lib/python2.6/test/sample_doctest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/seq_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/sortperf.py ... Compiling /tmp/python-test/local/lib/python2.6/test/string_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_MimeWriter.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_StringIO.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test___all__.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test___future__.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test__locale.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_aepack.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_al.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_anydbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_applesingle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_array.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ast.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_asynchat.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_atexit.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_audioop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_augassign.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_base64.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bastion.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bigaddrspace.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bigmem.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_binascii.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_binhex.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_binop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bisect.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bool.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bsddb.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bsddb185.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bsddb3.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bufio.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_builtin.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bz2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cProfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_calendar.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_call.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_capi.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cd.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cfgparser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cgi.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_charmapcodec.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_class.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cmath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cmd_line.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_code.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codeccallbacks.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_cn.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_hk.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_tw.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_cn.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_hk.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_tw.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codeop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_coding.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_coercion.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_collections.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_colorsys.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_commands.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_compare.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_compile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_compiler.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_complex.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_complex_args.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_contains.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_contextlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cookie.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cookielib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_copy.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_copy_reg.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cpickle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_crypt.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_csv.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ctypes.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_curses.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_datetime.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_decimal.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_decorators.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_defaultdict.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_deque.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_descr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_descrtut.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dict.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_difflib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dircache.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dis.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_distutils.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_doctest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_doctest2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dumbdbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dummy_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dummy_threading.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_email.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_email_codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_email_renamed.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_enumerate.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_eof.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_errno.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_exception_variations.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_exceptions.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_extcall.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fcntl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_file.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_filecmp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fileinput.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_float.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fnmatch.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fork1.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_format.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fpformat.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_frozen.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ftplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_funcattrs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_functools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future1.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future3.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gc.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gdbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_generators.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_genericpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_genexps.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_getargs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_getargs2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_getopt.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gettext.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_glob.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_global.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_grammar.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_grp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gzip.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hash.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hashlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_heapq.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hexoct.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hmac.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hotshot.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_htmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_htmlparser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_httplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imageop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imaplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imgfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_import.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_importhooks.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_index.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_inspect.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ioctl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_isinstance.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_iter.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_iterlen.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_itertools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_largefile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_linuxaudiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_list.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_locale.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_logging.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_long.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_long_future.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_longexp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_macostools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_macpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mailbox.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_marshal.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_math.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_md5.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mhlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mimetools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mimetypes.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_minidom.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mmap.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_module.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_modulefinder.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_multibytecodec.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_multibytecodec_support.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_multifile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mutants.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_netrc.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_new.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_nis.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_normalization.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ntpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_old_mailbox.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_opcodes.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_openpty.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_operator.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_optparse.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_os.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ossaudiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_parser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_peepholer.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep247.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep263.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep277.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep292.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep352.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pickle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pickletools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pkg.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pkgimport.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_platform.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_plistlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_poll.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_popen.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_popen2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_poplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_posix.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_posixpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pow.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pprint.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_profile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_profilehooks.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pty.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pwd.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pyclbr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pyexpat.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_queue.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_quopri.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_random.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_re.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_repr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_resource.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_rfc822.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_richcmp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_robotparser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_runpy.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sax.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_scope.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_scriptpackages.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_select.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_set.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sets.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sgmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sha.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_shelve.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_shlex.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_shutil.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_signal.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_site.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_slice.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_smtplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_socket.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_socket_ssl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_socketserver.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_softspace.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sort.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sqlite.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_startfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_str.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_strftime.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_string.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_stringprep.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_strop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_strptime.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_struct.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_structmembers.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_structseq.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_subprocess.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sunaudiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sundry.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_support.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_symtable.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_syntax.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sys.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tarfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tcl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_telnetlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tempfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_textwrap.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threaded_import.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threadedtempfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threading.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threading_local.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threadsignals.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_time.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_timeout.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tokenize.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_trace.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_traceback.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_transformer.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tuple.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_types.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ucn.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unary.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unicode.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unicode_file.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unicodedata.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unittest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_univnewlines.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unpack.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllib2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllib2net.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllibnet.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urlparse.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_userdict.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_userlist.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_userstring.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_uu.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_uuid.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wait3.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wait4.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_warnings.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wave.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_weakref.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_whichdb.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_winreg.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_winsound.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_with.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wsgiref.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xdrlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xml_etree.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xml_etree_c.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xmlrpc.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xpickle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xrange.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zipfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zipfile64.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zipimport.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/testall.py ... Compiling /tmp/python-test/local/lib/python2.6/test/testcodec.py ... Compiling /tmp/python-test/local/lib/python2.6/test/tf_inherit_check.py ... Compiling /tmp/python-test/local/lib/python2.6/test/threaded_import_hangers.py ... Compiling /tmp/python-test/local/lib/python2.6/test/time_hashlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/warning_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/xmltests.py ... Compiling /tmp/python-test/local/lib/python2.6/textwrap.py ... Compiling /tmp/python-test/local/lib/python2.6/this.py ... Compiling /tmp/python-test/local/lib/python2.6/threading.py ... Compiling /tmp/python-test/local/lib/python2.6/timeit.py ... Compiling /tmp/python-test/local/lib/python2.6/toaiff.py ... Compiling /tmp/python-test/local/lib/python2.6/token.py ... Compiling /tmp/python-test/local/lib/python2.6/tokenize.py ... Compiling /tmp/python-test/local/lib/python2.6/trace.py ... Compiling /tmp/python-test/local/lib/python2.6/traceback.py ... Compiling /tmp/python-test/local/lib/python2.6/tty.py ... Compiling /tmp/python-test/local/lib/python2.6/types.py ... Compiling /tmp/python-test/local/lib/python2.6/unittest.py ... Compiling /tmp/python-test/local/lib/python2.6/urllib.py ... Compiling /tmp/python-test/local/lib/python2.6/urllib2.py ... Compiling /tmp/python-test/local/lib/python2.6/urlparse.py ... Compiling /tmp/python-test/local/lib/python2.6/user.py ... Compiling /tmp/python-test/local/lib/python2.6/uu.py ... Compiling /tmp/python-test/local/lib/python2.6/uuid.py ... Compiling /tmp/python-test/local/lib/python2.6/warnings.py ... Compiling /tmp/python-test/local/lib/python2.6/wave.py ... Compiling /tmp/python-test/local/lib/python2.6/weakref.py ... Compiling /tmp/python-test/local/lib/python2.6/webbrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/whichdb.py ... Listing /tmp/python-test/local/lib/python2.6/wsgiref ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/handlers.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/headers.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/simple_server.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/util.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/validate.py ... Compiling /tmp/python-test/local/lib/python2.6/xdrlib.py ... Listing /tmp/python-test/local/lib/python2.6/xml ... Compiling /tmp/python-test/local/lib/python2.6/xml/__init__.py ... Listing /tmp/python-test/local/lib/python2.6/xml/dom ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/NodeFilter.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/domreg.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/expatbuilder.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/minicompat.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/minidom.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/pulldom.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/xmlbuilder.py ... Listing /tmp/python-test/local/lib/python2.6/xml/etree ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/ElementInclude.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/ElementPath.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/ElementTree.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/cElementTree.py ... Listing /tmp/python-test/local/lib/python2.6/xml/parsers ... Compiling /tmp/python-test/local/lib/python2.6/xml/parsers/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/parsers/expat.py ... Listing /tmp/python-test/local/lib/python2.6/xml/sax ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/_exceptions.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/expatreader.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/handler.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/saxutils.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/xmlreader.py ... Compiling /tmp/python-test/local/lib/python2.6/xmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/xmlrpclib.py ... Compiling /tmp/python-test/local/lib/python2.6/zipfile.py ... [10815 refs] PYTHONPATH=/tmp/python-test/local/lib/python2.6 \ ./python -Wi -tt -O /tmp/python-test/local/lib/python2.6/compileall.py \ -d /tmp/python-test/local/lib/python2.6 -f \ -x 'bad_coding|badsyntax|site-packages' /tmp/python-test/local/lib/python2.6 Listing /tmp/python-test/local/lib/python2.6 ... Compiling /tmp/python-test/local/lib/python2.6/BaseHTTPServer.py ... Compiling /tmp/python-test/local/lib/python2.6/Bastion.py ... Compiling /tmp/python-test/local/lib/python2.6/CGIHTTPServer.py ... Compiling /tmp/python-test/local/lib/python2.6/ConfigParser.py ... Compiling /tmp/python-test/local/lib/python2.6/Cookie.py ... Compiling /tmp/python-test/local/lib/python2.6/DocXMLRPCServer.py ... Compiling /tmp/python-test/local/lib/python2.6/HTMLParser.py ... Compiling /tmp/python-test/local/lib/python2.6/MimeWriter.py ... Compiling /tmp/python-test/local/lib/python2.6/Queue.py ... Compiling /tmp/python-test/local/lib/python2.6/SimpleHTTPServer.py ... Compiling /tmp/python-test/local/lib/python2.6/SimpleXMLRPCServer.py ... Compiling /tmp/python-test/local/lib/python2.6/SocketServer.py ... Compiling /tmp/python-test/local/lib/python2.6/StringIO.py ... Compiling /tmp/python-test/local/lib/python2.6/UserDict.py ... Compiling /tmp/python-test/local/lib/python2.6/UserList.py ... Compiling /tmp/python-test/local/lib/python2.6/UserString.py ... Compiling /tmp/python-test/local/lib/python2.6/_LWPCookieJar.py ... Compiling /tmp/python-test/local/lib/python2.6/_MozillaCookieJar.py ... Compiling /tmp/python-test/local/lib/python2.6/__future__.py ... Compiling /tmp/python-test/local/lib/python2.6/__phello__.foo.py ... Compiling /tmp/python-test/local/lib/python2.6/_strptime.py ... Compiling /tmp/python-test/local/lib/python2.6/_threading_local.py ... Compiling /tmp/python-test/local/lib/python2.6/aifc.py ... Compiling /tmp/python-test/local/lib/python2.6/anydbm.py ... Compiling /tmp/python-test/local/lib/python2.6/asynchat.py ... Compiling /tmp/python-test/local/lib/python2.6/asyncore.py ... Compiling /tmp/python-test/local/lib/python2.6/atexit.py ... Compiling /tmp/python-test/local/lib/python2.6/audiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/base64.py ... Compiling /tmp/python-test/local/lib/python2.6/bdb.py ... Compiling /tmp/python-test/local/lib/python2.6/binhex.py ... Compiling /tmp/python-test/local/lib/python2.6/bisect.py ... Listing /tmp/python-test/local/lib/python2.6/bsddb ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/db.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbobj.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbrecio.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbshelve.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbtables.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/dbutils.py ... Listing /tmp/python-test/local/lib/python2.6/bsddb/test ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_1413192.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_all.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_associate.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_basics.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_compare.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_compat.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_cursor_pget_bug.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_dbobj.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_dbshelve.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_dbtables.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_env_close.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_get_none.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_join.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_lock.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_misc.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_pickle.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_queue.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_recno.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_sequence.py ... Compiling /tmp/python-test/local/lib/python2.6/bsddb/test/test_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/cProfile.py ... Compiling /tmp/python-test/local/lib/python2.6/calendar.py ... Compiling /tmp/python-test/local/lib/python2.6/cgi.py ... Compiling /tmp/python-test/local/lib/python2.6/cgitb.py ... Compiling /tmp/python-test/local/lib/python2.6/chunk.py ... Compiling /tmp/python-test/local/lib/python2.6/cmd.py ... Compiling /tmp/python-test/local/lib/python2.6/code.py ... Compiling /tmp/python-test/local/lib/python2.6/codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/codeop.py ... Compiling /tmp/python-test/local/lib/python2.6/collections.py ... Compiling /tmp/python-test/local/lib/python2.6/colorsys.py ... Compiling /tmp/python-test/local/lib/python2.6/commands.py ... Compiling /tmp/python-test/local/lib/python2.6/compileall.py ... Listing /tmp/python-test/local/lib/python2.6/compiler ... Compiling /tmp/python-test/local/lib/python2.6/compiler/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/ast.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/consts.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/future.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/misc.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/pyassem.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/pycodegen.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/symbols.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/syntax.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/transformer.py ... Compiling /tmp/python-test/local/lib/python2.6/compiler/visitor.py ... Compiling /tmp/python-test/local/lib/python2.6/contextlib.py ... Compiling /tmp/python-test/local/lib/python2.6/cookielib.py ... Compiling /tmp/python-test/local/lib/python2.6/copy.py ... Compiling /tmp/python-test/local/lib/python2.6/copy_reg.py ... Compiling /tmp/python-test/local/lib/python2.6/csv.py ... Listing /tmp/python-test/local/lib/python2.6/ctypes ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/_endian.py ... Listing /tmp/python-test/local/lib/python2.6/ctypes/macholib ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/dyld.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/dylib.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/macholib/framework.py ... Listing /tmp/python-test/local/lib/python2.6/ctypes/test ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/runtests.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_anon.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_array_in_pointer.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_arrays.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_as_parameter.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_bitfields.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_buffers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_byteswap.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_callbacks.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_cast.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_cfuncs.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_checkretval.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_errcheck.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_find.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_funcptr.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_functions.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_incomplete.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_init.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_integers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_internals.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_keeprefs.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_libc.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_loading.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_macholib.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_memfunctions.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_numbers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_objects.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_parameters.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_pointers.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_prototypes.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_python_api.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_random_things.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_refcounts.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_repr.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_returnfuncptrs.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_simplesubclasses.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_sizes.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_slicing.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_stringptr.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_strings.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_struct_fields.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_structures.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_unaligned_structures.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_unicode.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_values.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_varsize_struct.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/test/test_win32.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/util.py ... Compiling /tmp/python-test/local/lib/python2.6/ctypes/wintypes.py ... Listing /tmp/python-test/local/lib/python2.6/curses ... Compiling /tmp/python-test/local/lib/python2.6/curses/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/ascii.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/has_key.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/panel.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/textpad.py ... Compiling /tmp/python-test/local/lib/python2.6/curses/wrapper.py ... Compiling /tmp/python-test/local/lib/python2.6/dbhash.py ... Compiling /tmp/python-test/local/lib/python2.6/decimal.py ... Compiling /tmp/python-test/local/lib/python2.6/difflib.py ... Compiling /tmp/python-test/local/lib/python2.6/dircache.py ... Compiling /tmp/python-test/local/lib/python2.6/dis.py ... Listing /tmp/python-test/local/lib/python2.6/distutils ... Compiling /tmp/python-test/local/lib/python2.6/distutils/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/archive_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/bcppcompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/ccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/cmd.py ... Listing /tmp/python-test/local/lib/python2.6/distutils/command ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_dumb.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_msi.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_rpm.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/bdist_wininst.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_clib.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_ext.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_py.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/build_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/clean.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/config.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_data.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_egg_info.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_headers.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_lib.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/install_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/register.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/sdist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/command/upload.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/core.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/cygwinccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/debug.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/dep_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/dir_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/dist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/emxccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/errors.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/extension.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/fancy_getopt.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/file_util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/filelist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/log.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/msvccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/mwerkscompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/spawn.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/sysconfig.py ... Listing /tmp/python-test/local/lib/python2.6/distutils/tests ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/support.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_build_py.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_build_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_dist.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_install.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_install_scripts.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/tests/test_versionpredicate.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/text_file.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/unixccompiler.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/util.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/version.py ... Compiling /tmp/python-test/local/lib/python2.6/distutils/versionpredicate.py ... Compiling /tmp/python-test/local/lib/python2.6/doctest.py ... Compiling /tmp/python-test/local/lib/python2.6/dumbdbm.py ... Compiling /tmp/python-test/local/lib/python2.6/dummy_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/dummy_threading.py ... Listing /tmp/python-test/local/lib/python2.6/email ... Compiling /tmp/python-test/local/lib/python2.6/email/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/email/_parseaddr.py ... Compiling /tmp/python-test/local/lib/python2.6/email/base64mime.py ... Compiling /tmp/python-test/local/lib/python2.6/email/charset.py ... Compiling /tmp/python-test/local/lib/python2.6/email/encoders.py ... Compiling /tmp/python-test/local/lib/python2.6/email/errors.py ... Compiling /tmp/python-test/local/lib/python2.6/email/feedparser.py ... Compiling /tmp/python-test/local/lib/python2.6/email/generator.py ... Compiling /tmp/python-test/local/lib/python2.6/email/header.py ... Compiling /tmp/python-test/local/lib/python2.6/email/iterators.py ... Compiling /tmp/python-test/local/lib/python2.6/email/message.py ... Listing /tmp/python-test/local/lib/python2.6/email/mime ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/application.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/audio.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/base.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/image.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/message.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/multipart.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/nonmultipart.py ... Compiling /tmp/python-test/local/lib/python2.6/email/mime/text.py ... Compiling /tmp/python-test/local/lib/python2.6/email/parser.py ... Compiling /tmp/python-test/local/lib/python2.6/email/quoprimime.py ... Listing /tmp/python-test/local/lib/python2.6/email/test ... Compiling /tmp/python-test/local/lib/python2.6/email/test/__init__.py ... Listing /tmp/python-test/local/lib/python2.6/email/test/data ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_codecs_renamed.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_renamed.py ... Compiling /tmp/python-test/local/lib/python2.6/email/test/test_email_torture.py ... Compiling /tmp/python-test/local/lib/python2.6/email/utils.py ... Listing /tmp/python-test/local/lib/python2.6/encodings ... Compiling /tmp/python-test/local/lib/python2.6/encodings/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/aliases.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/ascii.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/base64_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/big5.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/big5hkscs.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/bz2_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/charmap.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp037.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1006.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1026.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1140.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1250.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1251.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1252.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1253.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1254.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1255.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1256.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1257.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp1258.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp424.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp437.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp500.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp737.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp775.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp850.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp852.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp855.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp856.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp857.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp860.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp861.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp862.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp863.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp864.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp865.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp866.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp869.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp874.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp875.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp932.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp949.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/cp950.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_jis_2004.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_jisx0213.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/euc_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/gb18030.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/gb2312.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/gbk.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/hex_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/hp_roman8.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/hz.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/idna.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_1.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_2.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_2004.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_3.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_jp_ext.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso2022_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_1.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_10.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_11.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_13.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_14.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_15.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_16.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_2.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_3.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_4.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_5.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_6.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_7.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_8.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/iso8859_9.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/johab.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/koi8_r.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/koi8_u.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/latin_1.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_arabic.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_centeuro.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_croatian.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_cyrillic.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_farsi.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_greek.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_iceland.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_latin2.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_roman.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_romanian.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mac_turkish.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/mbcs.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/palmos.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/ptcp154.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/punycode.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/quopri_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/raw_unicode_escape.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/rot_13.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/shift_jis.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/shift_jis_2004.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/shift_jisx0213.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/string_escape.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/tis_620.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/undefined.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/unicode_escape.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/unicode_internal.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_16.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_16_be.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_16_le.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_7.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_8.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/utf_8_sig.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/uu_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/encodings/zlib_codec.py ... Compiling /tmp/python-test/local/lib/python2.6/filecmp.py ... Compiling /tmp/python-test/local/lib/python2.6/fileinput.py ... Compiling /tmp/python-test/local/lib/python2.6/fnmatch.py ... Compiling /tmp/python-test/local/lib/python2.6/formatter.py ... Compiling /tmp/python-test/local/lib/python2.6/fpformat.py ... Compiling /tmp/python-test/local/lib/python2.6/ftplib.py ... Compiling /tmp/python-test/local/lib/python2.6/functools.py ... Compiling /tmp/python-test/local/lib/python2.6/genericpath.py ... Compiling /tmp/python-test/local/lib/python2.6/getopt.py ... Compiling /tmp/python-test/local/lib/python2.6/getpass.py ... Compiling /tmp/python-test/local/lib/python2.6/gettext.py ... Compiling /tmp/python-test/local/lib/python2.6/glob.py ... Compiling /tmp/python-test/local/lib/python2.6/gzip.py ... Compiling /tmp/python-test/local/lib/python2.6/hashlib.py ... Compiling /tmp/python-test/local/lib/python2.6/heapq.py ... Compiling /tmp/python-test/local/lib/python2.6/hmac.py ... Listing /tmp/python-test/local/lib/python2.6/hotshot ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/log.py ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/stats.py ... Compiling /tmp/python-test/local/lib/python2.6/hotshot/stones.py ... Compiling /tmp/python-test/local/lib/python2.6/htmlentitydefs.py ... Compiling /tmp/python-test/local/lib/python2.6/htmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/httplib.py ... Listing /tmp/python-test/local/lib/python2.6/idlelib ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/AutoComplete.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/AutoCompleteWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/AutoExpand.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Bindings.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/CallTipWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/CallTips.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ClassBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/CodeContext.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ColorDelegator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Debugger.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Delegator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/EditorWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/FileList.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/FormatParagraph.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/GrepDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/HyperParser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/IOBinding.py ... Listing /tmp/python-test/local/lib/python2.6/idlelib/Icons ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/IdleHistory.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/MultiCall.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/MultiStatusBar.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ObjectBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/OutputWindow.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ParenMatch.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/PathBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/Percolator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/PyParse.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/PyShell.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/RemoteDebugger.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/RemoteObjectBrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ReplaceDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ScriptBinding.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ScrolledList.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/SearchDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/SearchDialogBase.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/SearchEngine.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/StackViewer.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ToolTip.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/TreeWidget.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/UndoDelegator.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/WidgetRedirector.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/WindowList.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/ZoomHeight.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/aboutDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configHandler.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configHelpSourceEdit.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/configSectionNameDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/dynOptionMenuWidget.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/idle.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/idlever.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/keybindingDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/macosxSupport.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/rpc.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/run.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/tabpage.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/testcode.py ... Compiling /tmp/python-test/local/lib/python2.6/idlelib/textView.py ... Compiling /tmp/python-test/local/lib/python2.6/ihooks.py ... Compiling /tmp/python-test/local/lib/python2.6/imaplib.py ... Compiling /tmp/python-test/local/lib/python2.6/imghdr.py ... Compiling /tmp/python-test/local/lib/python2.6/imputil.py ... Compiling /tmp/python-test/local/lib/python2.6/inspect.py ... Compiling /tmp/python-test/local/lib/python2.6/keyword.py ... Listing /tmp/python-test/local/lib/python2.6/lib-tk ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Canvas.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Dialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/FileDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/FixTk.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/ScrolledText.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/SimpleDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tix.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tkconstants.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tkdnd.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/Tkinter.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkColorChooser.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkCommonDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkFileDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkFont.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkMessageBox.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/tkSimpleDialog.py ... Compiling /tmp/python-test/local/lib/python2.6/lib-tk/turtle.py ... Compiling /tmp/python-test/local/lib/python2.6/linecache.py ... Compiling /tmp/python-test/local/lib/python2.6/locale.py ... Listing /tmp/python-test/local/lib/python2.6/logging ... Compiling /tmp/python-test/local/lib/python2.6/logging/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/logging/config.py ... Compiling /tmp/python-test/local/lib/python2.6/logging/handlers.py ... Compiling /tmp/python-test/local/lib/python2.6/macpath.py ... Compiling /tmp/python-test/local/lib/python2.6/macurl2path.py ... Compiling /tmp/python-test/local/lib/python2.6/mailbox.py ... Compiling /tmp/python-test/local/lib/python2.6/mailcap.py ... Compiling /tmp/python-test/local/lib/python2.6/markupbase.py ... Compiling /tmp/python-test/local/lib/python2.6/md5.py ... Compiling /tmp/python-test/local/lib/python2.6/mhlib.py ... Compiling /tmp/python-test/local/lib/python2.6/mimetools.py ... Compiling /tmp/python-test/local/lib/python2.6/mimetypes.py ... Compiling /tmp/python-test/local/lib/python2.6/mimify.py ... Compiling /tmp/python-test/local/lib/python2.6/modulefinder.py ... Compiling /tmp/python-test/local/lib/python2.6/multifile.py ... Compiling /tmp/python-test/local/lib/python2.6/mutex.py ... Compiling /tmp/python-test/local/lib/python2.6/netrc.py ... Compiling /tmp/python-test/local/lib/python2.6/new.py ... Compiling /tmp/python-test/local/lib/python2.6/nntplib.py ... Compiling /tmp/python-test/local/lib/python2.6/ntpath.py ... Compiling /tmp/python-test/local/lib/python2.6/nturl2path.py ... Compiling /tmp/python-test/local/lib/python2.6/opcode.py ... Compiling /tmp/python-test/local/lib/python2.6/optparse.py ... Compiling /tmp/python-test/local/lib/python2.6/os.py ... Compiling /tmp/python-test/local/lib/python2.6/os2emxpath.py ... Compiling /tmp/python-test/local/lib/python2.6/pdb.py ... Compiling /tmp/python-test/local/lib/python2.6/pickle.py ... Compiling /tmp/python-test/local/lib/python2.6/pickletools.py ... Compiling /tmp/python-test/local/lib/python2.6/pipes.py ... Compiling /tmp/python-test/local/lib/python2.6/pkgutil.py ... Listing /tmp/python-test/local/lib/python2.6/plat-linux2 ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/CDROM.py ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/DLFCN.py ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/IN.py ... Compiling /tmp/python-test/local/lib/python2.6/plat-linux2/TYPES.py ... Compiling /tmp/python-test/local/lib/python2.6/platform.py ... Compiling /tmp/python-test/local/lib/python2.6/popen2.py ... Compiling /tmp/python-test/local/lib/python2.6/poplib.py ... Compiling /tmp/python-test/local/lib/python2.6/posixfile.py ... Compiling /tmp/python-test/local/lib/python2.6/posixpath.py ... Compiling /tmp/python-test/local/lib/python2.6/pprint.py ... Compiling /tmp/python-test/local/lib/python2.6/profile.py ... Compiling /tmp/python-test/local/lib/python2.6/pstats.py ... Compiling /tmp/python-test/local/lib/python2.6/pty.py ... Compiling /tmp/python-test/local/lib/python2.6/py_compile.py ... Compiling /tmp/python-test/local/lib/python2.6/pyclbr.py ... Compiling /tmp/python-test/local/lib/python2.6/pydoc.py ... Compiling /tmp/python-test/local/lib/python2.6/quopri.py ... Compiling /tmp/python-test/local/lib/python2.6/random.py ... Compiling /tmp/python-test/local/lib/python2.6/re.py ... Compiling /tmp/python-test/local/lib/python2.6/repr.py ... Compiling /tmp/python-test/local/lib/python2.6/rexec.py ... Compiling /tmp/python-test/local/lib/python2.6/rfc822.py ... Compiling /tmp/python-test/local/lib/python2.6/rlcompleter.py ... Compiling /tmp/python-test/local/lib/python2.6/robotparser.py ... Compiling /tmp/python-test/local/lib/python2.6/runpy.py ... Compiling /tmp/python-test/local/lib/python2.6/sched.py ... Compiling /tmp/python-test/local/lib/python2.6/sets.py ... Compiling /tmp/python-test/local/lib/python2.6/sgmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/sha.py ... Compiling /tmp/python-test/local/lib/python2.6/shelve.py ... Compiling /tmp/python-test/local/lib/python2.6/shlex.py ... Compiling /tmp/python-test/local/lib/python2.6/shutil.py ... Compiling /tmp/python-test/local/lib/python2.6/site.py ... Compiling /tmp/python-test/local/lib/python2.6/smtpd.py ... Compiling /tmp/python-test/local/lib/python2.6/smtplib.py ... Compiling /tmp/python-test/local/lib/python2.6/sndhdr.py ... Compiling /tmp/python-test/local/lib/python2.6/socket.py ... Listing /tmp/python-test/local/lib/python2.6/sqlite3 ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/dbapi2.py ... Listing /tmp/python-test/local/lib/python2.6/sqlite3/test ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/dbapi.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/factory.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/hooks.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/regression.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/transactions.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/types.py ... Compiling /tmp/python-test/local/lib/python2.6/sqlite3/test/userfunctions.py ... Compiling /tmp/python-test/local/lib/python2.6/sre.py ... Compiling /tmp/python-test/local/lib/python2.6/sre_compile.py ... Compiling /tmp/python-test/local/lib/python2.6/sre_constants.py ... Compiling /tmp/python-test/local/lib/python2.6/sre_parse.py ... Compiling /tmp/python-test/local/lib/python2.6/stat.py ... Compiling /tmp/python-test/local/lib/python2.6/statvfs.py ... Compiling /tmp/python-test/local/lib/python2.6/string.py ... Compiling /tmp/python-test/local/lib/python2.6/stringold.py ... Compiling /tmp/python-test/local/lib/python2.6/stringprep.py ... Compiling /tmp/python-test/local/lib/python2.6/struct.py ... Compiling /tmp/python-test/local/lib/python2.6/subprocess.py ... Compiling /tmp/python-test/local/lib/python2.6/sunau.py ... Compiling /tmp/python-test/local/lib/python2.6/sunaudio.py ... Compiling /tmp/python-test/local/lib/python2.6/symbol.py ... Compiling /tmp/python-test/local/lib/python2.6/symtable.py ... Compiling /tmp/python-test/local/lib/python2.6/tabnanny.py ... Compiling /tmp/python-test/local/lib/python2.6/tarfile.py ... Compiling /tmp/python-test/local/lib/python2.6/telnetlib.py ... Compiling /tmp/python-test/local/lib/python2.6/tempfile.py ... Listing /tmp/python-test/local/lib/python2.6/test ... Compiling /tmp/python-test/local/lib/python2.6/test/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/test/autotest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/cjkencodings_test.py ... Listing /tmp/python-test/local/lib/python2.6/test/decimaltestdata ... Compiling /tmp/python-test/local/lib/python2.6/test/doctest_aliases.py ... Compiling /tmp/python-test/local/lib/python2.6/test/double_const.py ... Compiling /tmp/python-test/local/lib/python2.6/test/fork_wait.py ... Compiling /tmp/python-test/local/lib/python2.6/test/infinite_reload.py ... Compiling /tmp/python-test/local/lib/python2.6/test/inspect_fodder.py ... Compiling /tmp/python-test/local/lib/python2.6/test/inspect_fodder2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/list_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/mapping_tests.py ... Listing /tmp/python-test/local/lib/python2.6/test/output ... Compiling /tmp/python-test/local/lib/python2.6/test/outstanding_bugs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pickletester.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pyclbr_input.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pydocfodder.py ... Compiling /tmp/python-test/local/lib/python2.6/test/pystone.py ... Compiling /tmp/python-test/local/lib/python2.6/test/re_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/regex_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/regrtest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/reperf.py ... Compiling /tmp/python-test/local/lib/python2.6/test/sample_doctest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/seq_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/sortperf.py ... Compiling /tmp/python-test/local/lib/python2.6/test/string_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_MimeWriter.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_StringIO.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test___all__.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test___future__.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test__locale.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_aepack.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_al.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_anydbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_applesingle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_array.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ast.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_asynchat.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_atexit.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_audioop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_augassign.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_base64.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bastion.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bigaddrspace.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bigmem.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_binascii.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_binhex.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_binop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bisect.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bool.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bsddb.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bsddb185.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bsddb3.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bufio.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_builtin.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_bz2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cProfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_calendar.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_call.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_capi.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cd.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cfgparser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cgi.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_charmapcodec.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_class.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cmath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cmd_line.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_code.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codeccallbacks.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_cn.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_hk.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecencodings_tw.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_cn.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_hk.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_jp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_kr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecmaps_tw.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_codeop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_coding.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_coercion.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_collections.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_colorsys.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_commands.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_compare.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_compile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_compiler.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_complex.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_complex_args.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_contains.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_contextlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cookie.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cookielib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_copy.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_copy_reg.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_cpickle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_crypt.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_csv.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ctypes.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_curses.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_datetime.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_decimal.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_decorators.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_defaultdict.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_deque.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_descr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_descrtut.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dict.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_difflib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dircache.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dis.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_distutils.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_doctest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_doctest2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dumbdbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dummy_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_dummy_threading.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_email.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_email_codecs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_email_renamed.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_enumerate.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_eof.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_errno.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_exception_variations.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_exceptions.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_extcall.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fcntl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_file.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_filecmp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fileinput.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_float.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fnmatch.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fork1.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_format.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_fpformat.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_frozen.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ftplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_funcattrs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_functools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future1.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_future3.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gc.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gdbm.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_generators.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_genericpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_genexps.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_getargs.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_getargs2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_getopt.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gettext.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_glob.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_global.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_grammar.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_grp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_gzip.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hash.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hashlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_heapq.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hexoct.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hmac.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_hotshot.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_htmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_htmlparser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_httplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imageop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imaplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imgfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_imp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_import.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_importhooks.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_index.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_inspect.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ioctl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_isinstance.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_iter.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_iterlen.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_itertools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_largefile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_linuxaudiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_list.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_locale.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_logging.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_long.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_long_future.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_longexp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_macostools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_macpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mailbox.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_marshal.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_math.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_md5.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mhlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mimetools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mimetypes.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_minidom.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mmap.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_module.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_modulefinder.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_multibytecodec.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_multibytecodec_support.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_multifile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_mutants.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_netrc.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_new.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_nis.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_normalization.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ntpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_old_mailbox.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_opcodes.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_openpty.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_operator.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_optparse.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_os.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ossaudiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_parser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_peepholer.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep247.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep263.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep277.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep292.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pep352.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pickle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pickletools.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pkg.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pkgimport.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_platform.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_plistlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_poll.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_popen.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_popen2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_poplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_posix.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_posixpath.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pow.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pprint.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_profile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_profilehooks.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pty.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pwd.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pyclbr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_pyexpat.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_queue.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_quopri.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_random.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_re.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_repr.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_resource.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_rfc822.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_richcmp.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_robotparser.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_runpy.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sax.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_scope.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_scriptpackages.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_select.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_set.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sets.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sgmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sha.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_shelve.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_shlex.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_shutil.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_signal.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_site.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_slice.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_smtplib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_socket.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_socket_ssl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_socketserver.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_softspace.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sort.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sqlite.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_startfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_str.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_strftime.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_string.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_stringprep.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_strop.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_strptime.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_struct.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_structmembers.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_structseq.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_subprocess.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sunaudiodev.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sundry.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_support.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_symtable.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_syntax.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_sys.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tarfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tcl.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_telnetlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tempfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_textwrap.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_thread.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threaded_import.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threadedtempfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threading.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threading_local.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_threadsignals.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_time.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_timeout.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tokenize.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_trace.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_traceback.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_transformer.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_tuple.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_types.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_ucn.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unary.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unicode.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unicode_file.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unicodedata.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unittest.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_univnewlines.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_unpack.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllib2.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllib2net.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urllibnet.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_urlparse.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_userdict.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_userlist.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_userstring.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_uu.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_uuid.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wait3.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wait4.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_warnings.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wave.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_weakref.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_whichdb.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_winreg.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_winsound.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_with.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_wsgiref.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xdrlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xml_etree.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xml_etree_c.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xmlrpc.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xpickle.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_xrange.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zipfile.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zipfile64.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zipimport.py ... Compiling /tmp/python-test/local/lib/python2.6/test/test_zlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/testall.py ... Compiling /tmp/python-test/local/lib/python2.6/test/testcodec.py ... Compiling /tmp/python-test/local/lib/python2.6/test/tf_inherit_check.py ... Compiling /tmp/python-test/local/lib/python2.6/test/threaded_import_hangers.py ... Compiling /tmp/python-test/local/lib/python2.6/test/time_hashlib.py ... Compiling /tmp/python-test/local/lib/python2.6/test/warning_tests.py ... Compiling /tmp/python-test/local/lib/python2.6/test/xmltests.py ... Compiling /tmp/python-test/local/lib/python2.6/textwrap.py ... Compiling /tmp/python-test/local/lib/python2.6/this.py ... Compiling /tmp/python-test/local/lib/python2.6/threading.py ... Compiling /tmp/python-test/local/lib/python2.6/timeit.py ... Compiling /tmp/python-test/local/lib/python2.6/toaiff.py ... Compiling /tmp/python-test/local/lib/python2.6/token.py ... Compiling /tmp/python-test/local/lib/python2.6/tokenize.py ... Compiling /tmp/python-test/local/lib/python2.6/trace.py ... Compiling /tmp/python-test/local/lib/python2.6/traceback.py ... Compiling /tmp/python-test/local/lib/python2.6/tty.py ... Compiling /tmp/python-test/local/lib/python2.6/types.py ... Compiling /tmp/python-test/local/lib/python2.6/unittest.py ... Compiling /tmp/python-test/local/lib/python2.6/urllib.py ... Compiling /tmp/python-test/local/lib/python2.6/urllib2.py ... Compiling /tmp/python-test/local/lib/python2.6/urlparse.py ... Compiling /tmp/python-test/local/lib/python2.6/user.py ... Compiling /tmp/python-test/local/lib/python2.6/uu.py ... Compiling /tmp/python-test/local/lib/python2.6/uuid.py ... Compiling /tmp/python-test/local/lib/python2.6/warnings.py ... Compiling /tmp/python-test/local/lib/python2.6/wave.py ... Compiling /tmp/python-test/local/lib/python2.6/weakref.py ... Compiling /tmp/python-test/local/lib/python2.6/webbrowser.py ... Compiling /tmp/python-test/local/lib/python2.6/whichdb.py ... Listing /tmp/python-test/local/lib/python2.6/wsgiref ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/handlers.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/headers.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/simple_server.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/util.py ... Compiling /tmp/python-test/local/lib/python2.6/wsgiref/validate.py ... Compiling /tmp/python-test/local/lib/python2.6/xdrlib.py ... Listing /tmp/python-test/local/lib/python2.6/xml ... Compiling /tmp/python-test/local/lib/python2.6/xml/__init__.py ... Listing /tmp/python-test/local/lib/python2.6/xml/dom ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/NodeFilter.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/domreg.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/expatbuilder.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/minicompat.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/minidom.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/pulldom.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/dom/xmlbuilder.py ... Listing /tmp/python-test/local/lib/python2.6/xml/etree ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/ElementInclude.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/ElementPath.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/ElementTree.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/etree/cElementTree.py ... Listing /tmp/python-test/local/lib/python2.6/xml/parsers ... Compiling /tmp/python-test/local/lib/python2.6/xml/parsers/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/parsers/expat.py ... Listing /tmp/python-test/local/lib/python2.6/xml/sax ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/__init__.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/_exceptions.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/expatreader.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/handler.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/saxutils.py ... Compiling /tmp/python-test/local/lib/python2.6/xml/sax/xmlreader.py ... Compiling /tmp/python-test/local/lib/python2.6/xmllib.py ... Compiling /tmp/python-test/local/lib/python2.6/xmlrpclib.py ... Compiling /tmp/python-test/local/lib/python2.6/zipfile.py ... [10814 refs] PYTHONPATH=/tmp/python-test/local/lib/python2.6 \ ./python -Wi -t /tmp/python-test/local/lib/python2.6/compileall.py \ -d /tmp/python-test/local/lib/python2.6/site-packages -f \ -x badsyntax /tmp/python-test/local/lib/python2.6/site-packages Listing /tmp/python-test/local/lib/python2.6/site-packages ... [9122 refs] PYTHONPATH=/tmp/python-test/local/lib/python2.6 \ ./python -Wi -t -O /tmp/python-test/local/lib/python2.6/compileall.py \ -d /tmp/python-test/local/lib/python2.6/site-packages -f \ -x badsyntax /tmp/python-test/local/lib/python2.6/site-packages Listing /tmp/python-test/local/lib/python2.6/site-packages ... [9122 refs] Creating directory /tmp/python-test/local/include Creating directory /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/Python-ast.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/Python.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/abstract.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/asdl.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/ast.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/bitset.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/boolobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/bufferobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/cStringIO.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/cellobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/ceval.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/classobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/cobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/code.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/codecs.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/compile.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/complexobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/datetime.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/descrobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/dictobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/enumobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/errcode.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/eval.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/fileobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/floatobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/frameobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/funcobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/genobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/graminit.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/grammar.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/import.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/intobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/intrcheck.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/iterobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/listobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/longintrepr.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/longobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/marshal.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/metagrammar.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/methodobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/modsupport.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/moduleobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/node.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/object.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/objimpl.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/opcode.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/osdefs.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/parsetok.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/patchlevel.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pgen.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pgenheaders.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/py_curses.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pyarena.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pydebug.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pyerrors.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pyexpat.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pyfpe.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pygetopt.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pymactoolbox.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pymem.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pyport.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pystate.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pystrtod.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pythonrun.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/pythread.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/rangeobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/setobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/sliceobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/stringobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/structmember.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/structseq.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/symtable.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/sysmodule.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/timefuncs.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/token.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/traceback.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/tupleobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/ucnhash.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/unicodeobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 ./Include/weakrefobject.h /tmp/python-test/local/include/python2.6 /usr/bin/install -c -m 644 pyconfig.h /tmp/python-test/local/include/python2.6/pyconfig.h running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers Failed to find the necessary bits to build these modules: _md5 _sha _tkinter bsddb185 sunaudiodev running build_scripts [34130 refs] Creating directory /tmp/python-test/local/lib/python2.6/config /usr/bin/install -c -m 644 Modules/config.c /tmp/python-test/local/lib/python2.6/config/config.c /usr/bin/install -c -m 644 Modules/python.o /tmp/python-test/local/lib/python2.6/config/python.o /usr/bin/install -c -m 644 ./Modules/config.c.in /tmp/python-test/local/lib/python2.6/config/config.c.in /usr/bin/install -c -m 644 Makefile /tmp/python-test/local/lib/python2.6/config/Makefile /usr/bin/install -c -m 644 Modules/Setup /tmp/python-test/local/lib/python2.6/config/Setup /usr/bin/install -c -m 644 Modules/Setup.local /tmp/python-test/local/lib/python2.6/config/Setup.local /usr/bin/install -c -m 644 Modules/Setup.config /tmp/python-test/local/lib/python2.6/config/Setup.config /usr/bin/install -c ./Modules/makesetup /tmp/python-test/local/lib/python2.6/config/makesetup /usr/bin/install -c ./install-sh /tmp/python-test/local/lib/python2.6/config/install-sh # Substitution happens here, as the completely-expanded BINDIR # is not available in configure sed -e "s, at EXENAME@,/tmp/python-test/local/bin/python2.6," < ./Misc/python-config.in >python-config /usr/bin/install -c python-config /tmp/python-test/local/bin/python2.6-config rm python-config ./python -E ./setup.py install \ --prefix=/tmp/python-test/local \ --install-scripts=/tmp/python-test/local/bin \ --install-platlib=/tmp/python-test/local/lib/python2.6/lib-dynload \ --root=/ running install running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers Failed to find the necessary bits to build these modules: _md5 _sha _tkinter bsddb185 sunaudiodev running build_scripts running install_lib creating /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_struct.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_ctypes.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_ctypes_test.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_weakref.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/array.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/cmath.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/math.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/strop.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/time.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/datetime.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_random.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/itertools.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/collections.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_bisect.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_heapq.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/operator.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_functools.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_testcapi.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_hotshot.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_lsprof.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/unicodedata.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_locale.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/fcntl.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/grp.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/spwd.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/select.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/binascii.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/parser.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/cStringIO.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/cPickle.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/mmap.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/syslog.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/audioop.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/imageop.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/rgbimg.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/readline.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/crypt.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_csv.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_socket.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_ssl.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_hashlib.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_sha256.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_sha512.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_bsddb.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_sqlite3.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/dbm.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/gdbm.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/termios.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/resource.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/nis.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_curses.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_curses_panel.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/zlib.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/bz2.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/pyexpat.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_elementtree.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_multibytecodec.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_codecs_kr.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_codecs_jp.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_codecs_cn.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_codecs_tw.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_codecs_hk.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_codecs_iso2022.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/dl.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/linuxaudiodev.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/ossaudiodev.so -> /tmp/python-test/local/lib/python2.6/lib-dynload copying build/lib.linux-i686-2.6/_collections.so -> /tmp/python-test/local/lib/python2.6/lib-dynload changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_struct.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_ctypes.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_ctypes_test.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_weakref.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/array.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/cmath.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/math.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/strop.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/time.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/datetime.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_random.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/itertools.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/collections.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_bisect.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_heapq.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/operator.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_functools.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_testcapi.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_hotshot.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_lsprof.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/unicodedata.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_locale.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/fcntl.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/grp.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/spwd.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/select.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/binascii.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/parser.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/cStringIO.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/cPickle.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/mmap.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/syslog.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/audioop.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/imageop.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/rgbimg.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/readline.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/crypt.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_csv.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_socket.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_ssl.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_hashlib.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_sha256.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_sha512.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_bsddb.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_sqlite3.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/dbm.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/gdbm.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/termios.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/resource.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/nis.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_curses.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_curses_panel.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/zlib.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/bz2.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/pyexpat.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_elementtree.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_multibytecodec.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_codecs_kr.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_codecs_jp.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_codecs_cn.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_codecs_tw.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_codecs_hk.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_codecs_iso2022.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/dl.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/linuxaudiodev.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/ossaudiodev.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/_collections.so to 755 changing mode of /tmp/python-test/local/lib/python2.6/lib-dynload/ to 755 running install_scripts copying build/scripts-2.6/pydoc -> /tmp/python-test/local/bin copying build/scripts-2.6/idle -> /tmp/python-test/local/bin copying build/scripts-2.6/smtpd.py -> /tmp/python-test/local/bin changing mode of /tmp/python-test/local/bin/pydoc to 755 changing mode of /tmp/python-test/local/bin/idle to 755 changing mode of /tmp/python-test/local/bin/smtpd.py to 755 running install_egg_info Writing /tmp/python-test/local/lib/python2.6/lib-dynload/Python-2.6a0-py2.6.egg-info [34700 refs] if test -f /tmp/python-test/local/bin/python -o -h /tmp/python-test/local/bin/python; \ then rm -f /tmp/python-test/local/bin/python; \ else true; \ fi (cd /tmp/python-test/local/bin; ln python2.6 python) (cd /tmp/python-test/local/bin; ln -sf python2.6-config python-config) Creating directory /tmp/python-test/local/man Creating directory /tmp/python-test/local/man/man1 /usr/bin/install -c -m 644 ./Misc/python.man \ /tmp/python-test/local/man/man1/python.1 From python-checkins at python.org Sat Jun 2 01:17:18 2007 From: python-checkins at python.org (guido.van.rossum) Date: Sat, 2 Jun 2007 01:17:18 +0200 (CEST) Subject: [Python-checkins] r55737 - peps/trunk/pep-3115.txt Message-ID: <20070601231718.8CA641E4008@bag.python.org> Author: guido.van.rossum Date: Sat Jun 2 01:17:14 2007 New Revision: 55737 Modified: peps/trunk/pep-3115.txt Log: Fix bugs in example found by Georg Brandl. Modified: peps/trunk/pep-3115.txt ============================================================================== --- peps/trunk/pep-3115.txt (original) +++ peps/trunk/pep-3115.txt Sat Jun 2 01:17:14 2007 @@ -197,7 +197,7 @@ self.member_names.append(key) # Call superclass - dict.setitem(self, key, value) + dict.__setitem__(self, key, value) # The metaclass class OrderedClass(type): @@ -208,12 +208,12 @@ return member_table() # The metaclass invocation - def __init__(self, name, bases, classdict): + def __new__(cls, name, bases, classdict): # Note that we replace the classdict with a regular # dict before passing it to the superclass, so that we # don't continue to record member names after the class # has been created. - result = type(name, bases, dict(classdict)) + result = type.__new__(cls, name, bases, dict(classdict)) result.member_names = classdict.member_names return result From python-checkins at python.org Sat Jun 2 05:02:51 2007 From: python-checkins at python.org (brett.cannon) Date: Sat, 2 Jun 2007 05:02:51 +0200 (CEST) Subject: [Python-checkins] r55739 - in python/trunk: Misc/NEWS README configure configure.in Message-ID: <20070602030251.109811E4003@bag.python.org> Author: brett.cannon Date: Sat Jun 2 05:02:29 2007 New Revision: 55739 Modified: python/trunk/Misc/NEWS python/trunk/README python/trunk/configure python/trunk/configure.in Log: Have configure raise an error when building on AtheOS. Code specific to AtheOS will be removed in Python 2.7. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jun 2 05:02:29 2007 @@ -868,6 +868,8 @@ Build ----- +- Stop supporting AtheOS and cause a build error in configure for the platform. + - Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS returned by python-config if Python was built with --enable-shared because that prevented the shared library from being used. Modified: python/trunk/README ============================================================================== --- python/trunk/README (original) +++ python/trunk/README Sat Jun 2 05:02:29 2007 @@ -669,7 +669,11 @@ News regarding these platforms with more recent Cygwin versions would be appreciated! -AtheOS: From Octavian Cerna : +AtheOS: Official support has been stopped as of Python 2.6. All code will be + removed in Python 2.7 unless a maintainer steps forward for this + platform. + + From Octavian Cerna : Before building: Modified: python/trunk/configure ============================================================================== --- python/trunk/configure (original) +++ python/trunk/configure Sat Jun 2 05:02:29 2007 @@ -1,28 +1,57 @@ #! /bin/sh -# From configure.in Revision: 53826 . +# From configure.in Revision: 54283 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for python 2.6. +# Generated by GNU Autoconf 2.61 for python 2.6. # # Report bugs to . # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -32,8 +61,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -47,18 +111,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -66,157 +131,388 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf at gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -225,7 +521,28 @@ as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -234,39 +551,27 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='python' PACKAGE_TARNAME='python' @@ -278,42 +583,166 @@ # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS UNIVERSALSDK PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR FRAMEWORKINSTALLFIRST FRAMEWORKINSTALLLAST FRAMEWORKALTINSTALLFIRST FRAMEWORKALTINSTALLLAST FRAMEWORKUNIXTOOLSPREFIX MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX MAINCC CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR SVNVERSION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +VERSION +SOVERSION +CONFIG_ARGS +UNIVERSALSDK +PYTHONFRAMEWORK +PYTHONFRAMEWORKDIR +PYTHONFRAMEWORKPREFIX +PYTHONFRAMEWORKINSTALLDIR +FRAMEWORKINSTALLFIRST +FRAMEWORKINSTALLLAST +FRAMEWORKALTINSTALLFIRST +FRAMEWORKALTINSTALLLAST +FRAMEWORKUNIXTOOLSPREFIX +MACHDEP +SGI_ABI +EXTRAPLATDIR +EXTRAMACHDEPPATH +CONFIGURE_MACOSX_DEPLOYMENT_TARGET +EXPORT_MACOSX_DEPLOYMENT_TARGET +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +CXX +MAINCC +CPP +GREP +EGREP +BUILDEXEEXT +LIBRARY +LDLIBRARY +DLLLIBRARY +BLDLIBRARY +LDLIBRARYDIR +INSTSONAME +RUNSHARED +LINKCC +RANLIB +AR +SVNVERSION +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LN +OPT +BASECFLAGS +OTHER_LIBTOOL_OPT +LIBTOOL_CRUFT +SO +LDSHARED +BLDSHARED +CCSHARED +LINKFORSHARED +CFLAGSFORSHARED +SHLIBS +USE_SIGNAL_MODULE +SIGNAL_OBJS +USE_THREAD_MODULE +LDLAST +THREADOBJ +DLINCLDIR +DYNLOADFILE +MACHDEP_OBJS +TRUE +LIBOBJS +HAVE_GETHOSTBYNAME_R_6_ARG +HAVE_GETHOSTBYNAME_R_5_ARG +HAVE_GETHOSTBYNAME_R_3_ARG +HAVE_GETHOSTBYNAME_R +HAVE_GETHOSTBYNAME +LIBM +LIBC +UNICODE_OBJS +THREADHEADERS +SRCDIRS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -340,34 +769,48 @@ # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -389,33 +832,45 @@ --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -442,6 +897,12 @@ -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -466,13 +927,16 @@ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -537,6 +1001,16 @@ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -589,24 +1063,20 @@ -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -637,8 +1107,7 @@ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -658,27 +1127,19 @@ { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -705,74 +1166,76 @@ test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -801,9 +1264,6 @@ -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -821,15 +1281,22 @@ --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/python] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -888,8 +1355,9 @@ CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help @@ -897,120 +1365,86 @@ Report bugs to . _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF python configure 2.6 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 2.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1029,7 +1463,7 @@ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1043,6 +1477,7 @@ test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1064,7 +1499,6 @@ ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1075,7 +1509,7 @@ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1097,9 +1531,7 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1110,8 +1542,8 @@ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1124,20 +1556,34 @@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1148,22 +1594,28 @@ echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1175,26 +1627,24 @@ ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1225,14 +1675,17 @@ # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1248,8 +1701,8 @@ { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1261,12 +1714,11 @@ # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1291,8 +1743,7 @@ # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1309,12 +1760,6 @@ { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1339,10 +1784,15 @@ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_config_headers="$ac_config_headers pyconfig.h" +ac_config_headers="$ac_config_headers pyconfig.h" @@ -1402,10 +1852,9 @@ CONFIG_ARGS="$ac_configure_args" -# Check whether --enable-universalsdk or --disable-universalsdk was given. +# Check whether --enable-universalsdk was given. if test "${enable_universalsdk+set}" = set; then - enableval="$enable_universalsdk" - + enableval=$enable_universalsdk; case $enableval in yes) enableval=/Developer/SDKs/MacOSX10.4u.sdk @@ -1426,13 +1875,13 @@ UNIVERSALSDK= enable_universalsdk= -fi; +fi + -# Check whether --enable-framework or --disable-framework was given. +# Check whether --enable-framework was given. if test "${enable_framework+set}" = set; then - enableval="$enable_framework" - + enableval=$enable_framework; case $enableval in yes) enableval=/Library/Frameworks @@ -1472,11 +1921,11 @@ # Add makefiles for Mac specific code to the list of output # files: - ac_config_files="$ac_config_files Mac/Makefile" + ac_config_files="$ac_config_files Mac/Makefile" - ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile" + ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile" - ac_config_files="$ac_config_files Mac/IDLE/Makefile" + ac_config_files="$ac_config_files Mac/IDLE/Makefile" esac @@ -1497,7 +1946,8 @@ fi enable_framework= -fi; +fi + @@ -1514,8 +1964,8 @@ ## # Set name for machine-dependent library files -echo "$as_me:$LINENO: checking MACHDEP" >&5 -echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking MACHDEP" >&5 +echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; } if test -z "$MACHDEP" then ac_sys_system=`uname -s` @@ -1664,14 +2114,14 @@ LDFLAGS="$SGI_ABI $LDFLAGS" MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` fi -echo "$as_me:$LINENO: result: $MACHDEP" >&5 -echo "${ECHO_T}$MACHDEP" >&6 +{ echo "$as_me:$LINENO: result: $MACHDEP" >&5 +echo "${ECHO_T}$MACHDEP" >&6; } # And add extra plat-mac for darwin -echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5 -echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5 +echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; } if test -z "$EXTRAPLATDIR" then case $MACHDEP in @@ -1685,8 +2135,8 @@ ;; esac fi -echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5 -echo "${ECHO_T}$EXTRAPLATDIR" >&6 +{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5 +echo "${ECHO_T}$EXTRAPLATDIR" >&6; } # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, # it may influence the way we can build extensions, so distutils @@ -1706,13 +2156,12 @@ # XXX shouldn't some/most/all of this code be merged with the stuff later # on that fiddles with OPT and BASECFLAGS? -echo "$as_me:$LINENO: checking for --without-gcc" >&5 -echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --without-gcc" >&5 +echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; } -# Check whether --with-gcc or --without-gcc was given. +# Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then - withval="$with_gcc" - + withval=$with_gcc; case $withval in no) CC=cc without_gcc=yes;; @@ -1754,9 +2203,10 @@ without_gcc=;; *) without_gcc=no;; esac -fi; -echo "$as_me:$LINENO: result: $without_gcc" >&5 -echo "${ECHO_T}$without_gcc" >&6 +fi + +{ echo "$as_me:$LINENO: result: $without_gcc" >&5 +echo "${ECHO_T}$without_gcc" >&6; } # If the user switches compilers, we can't believe the cache if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" @@ -1776,8 +2226,8 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1790,32 +2240,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1828,36 +2280,51 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1870,74 +2337,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1951,7 +2378,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1962,6 +2389,7 @@ fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1979,22 +2407,23 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2007,36 +2436,38 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2049,29 +2480,45 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -2084,21 +2531,35 @@ { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2123,47 +2584,77 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2175,19 +2666,21 @@ fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2206,22 +2699,27 @@ fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2232,9 +2730,8 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2248,14 +2745,14 @@ fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2275,14 +2772,20 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2300,12 +2803,12 @@ rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2328,50 +2831,49 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2387,38 +2889,118 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2434,12 +3016,12 @@ CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2473,12 +3055,17 @@ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2493,205 +3080,57 @@ return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2701,13 +3140,12 @@ -echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 -echo $ECHO_N "checking for --with-cxx-main=... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-cxx-main=" >&5 +echo $ECHO_N "checking for --with-cxx-main=... $ECHO_C" >&6; } -# Check whether --with-cxx_main or --without-cxx_main was given. +# Check whether --with-cxx_main was given. if test "${with_cxx_main+set}" = set; then - withval="$with_cxx_main" - + withval=$with_cxx_main; case $withval in no) with_cxx_main=no @@ -2726,9 +3164,10 @@ with_cxx_main=no MAINCC='$(CC)' -fi; -echo "$as_me:$LINENO: result: $with_cxx_main" >&5 -echo "${ECHO_T}$with_cxx_main" >&6 +fi + +{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5 +echo "${ECHO_T}$with_cxx_main" >&6; } preset_cxx="$CXX" if test -z "$CXX" @@ -2736,8 +3175,8 @@ case "$CC" in gcc) # Extract the first word of "g++", so it can be a program name with args. set dummy g++; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2752,32 +3191,33 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++" ;; esac fi CXX=$ac_cv_path_CXX - if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + ;; cc) # Extract the first word of "c++", so it can be a program name with args. set dummy c++; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2792,27 +3232,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++" ;; esac fi CXX=$ac_cv_path_CXX - if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + ;; esac if test "$CXX" = "notfound" @@ -2826,8 +3267,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2840,25 +3281,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 + { echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CXX" && break done test -n "$CXX" || CXX="notfound" @@ -2890,8 +3333,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2925,24 +3368,22 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -2951,9 +3392,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2963,24 +3405,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -2991,6 +3431,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3008,8 +3449,8 @@ else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3032,24 +3473,22 @@ #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3058,9 +3497,10 @@ # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3070,24 +3510,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3098,6 +3536,7 @@ ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3120,24 +3559,171 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for AIX" >&5 -echo $ECHO_N "checking for AIX... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for AIX" >&5 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3151,15 +3737,15 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi rm -f conftest* @@ -3167,46 +3753,46 @@ # Check for unsupported systems case $ac_sys_system/$ac_sys_release in -Linux*/1*) +atheos*|Linux*/1*) echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. echo See README for details. exit 1;; esac -echo "$as_me:$LINENO: checking for --with-suffix" >&5 -echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-suffix" >&5 +echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; } -# Check whether --with-suffix or --without-suffix was given. +# Check whether --with-suffix was given. if test "${with_suffix+set}" = set; then - withval="$with_suffix" - + withval=$with_suffix; case $withval in no) EXEEXT=;; yes) EXEEXT=.exe;; *) EXEEXT=$withval;; esac -fi; -echo "$as_me:$LINENO: result: $EXEEXT" >&5 -echo "${ECHO_T}$EXEEXT" >&6 +fi + +{ echo "$as_me:$LINENO: result: $EXEEXT" >&5 +echo "${ECHO_T}$EXEEXT" >&6; } # Test whether we're running on a non-case-sensitive system, in which # case we give a warning if no ext is given -echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 -echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5 +echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; } if test ! -d CaseSensitiveTestDir; then mkdir CaseSensitiveTestDir fi if test -d casesensitivetestdir then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } BUILDEXEEXT=.exe else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } BUILDEXEEXT=$EXEEXT fi rmdir CaseSensitiveTestDir @@ -3239,14 +3825,14 @@ -echo "$as_me:$LINENO: checking LIBRARY" >&5 -echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking LIBRARY" >&5 +echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; } if test -z "$LIBRARY" then LIBRARY='libpython$(VERSION).a' fi -echo "$as_me:$LINENO: result: $LIBRARY" >&5 -echo "${ECHO_T}$LIBRARY" >&6 +{ echo "$as_me:$LINENO: result: $LIBRARY" >&5 +echo "${ECHO_T}$LIBRARY" >&6; } # LDLIBRARY is the name of the library to link against (as opposed to the # name of the library into which to insert object files). BLDLIBRARY is also @@ -3281,8 +3867,8 @@ # This is altered for AIX in order to build the export list before # linking. -echo "$as_me:$LINENO: checking LINKCC" >&5 -echo $ECHO_N "checking LINKCC... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking LINKCC" >&5 +echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; } if test -z "$LINKCC" then LINKCC='$(PURIFY) $(MAINCC)' @@ -3298,16 +3884,16 @@ LINKCC="$LINKCC -L/usr/lib/ia64l64";; esac fi -echo "$as_me:$LINENO: result: $LINKCC" >&5 -echo "${ECHO_T}$LINKCC" >&6 +{ echo "$as_me:$LINENO: result: $LINKCC" >&5 +echo "${ECHO_T}$LINKCC" >&6; } -echo "$as_me:$LINENO: checking for --enable-shared" >&5 -echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6 -# Check whether --enable-shared or --disable-shared was given. +{ echo "$as_me:$LINENO: checking for --enable-shared" >&5 +echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; } +# Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then - enableval="$enable_shared" + enableval=$enable_shared; +fi -fi; if test -z "$enable_shared" then @@ -3318,15 +3904,14 @@ enable_shared="no";; esac fi -echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 +{ echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6; } -echo "$as_me:$LINENO: checking for --enable-profiling" >&5 -echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6 -# Check whether --enable-profiling or --disable-profiling was given. +{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5 +echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; } +# Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then - enableval="$enable_profiling" - ac_save_cc="$CC" + enableval=$enable_profiling; ac_save_cc="$CC" CC="$CC -pg" if test "$cross_compiling" = yes; then ac_enable_profiling="no" @@ -3340,13 +3925,22 @@ int main() { return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3359,12 +3953,15 @@ ( exit $ac_status ) ac_enable_profiling="no" fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" -fi; -echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 -echo "${ECHO_T}$ac_enable_profiling" >&6 +fi + +{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5 +echo "${ECHO_T}$ac_enable_profiling" >&6; } case "$ac_enable_profiling" in "yes") @@ -3373,8 +3970,8 @@ ;; esac -echo "$as_me:$LINENO: checking LDLIBRARY" >&5 -echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5 +echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; } # MacOSX framework builds need more magic. LDLIBRARY is the dynamic # library that we build, but we do not want to link against it (we @@ -3455,14 +4052,14 @@ esac fi -echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 -echo "${ECHO_T}$LDLIBRARY" >&6 +{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5 +echo "${ECHO_T}$LDLIBRARY" >&6; } if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3475,32 +4072,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3513,27 +4112,41 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf at gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -3543,8 +4156,8 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3557,25 +4170,27 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$AR" && break done test -n "$AR" || AR="ar" @@ -3584,8 +4199,8 @@ # Extract the first word of "svnversion", so it can be a program name with args. set dummy svnversion; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_SVNVERSION+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3598,26 +4213,28 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_SVNVERSION="found" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found" fi fi SVNVERSION=$ac_cv_prog_SVNVERSION if test -n "$SVNVERSION"; then - echo "$as_me:$LINENO: result: $SVNVERSION" >&5 -echo "${ECHO_T}$SVNVERSION" >&6 + { echo "$as_me:$LINENO: result: $SVNVERSION" >&5 +echo "${ECHO_T}$SVNVERSION" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + if test $SVNVERSION = found then SVNVERSION="svnversion \$(srcdir)" @@ -3634,29 +4251,35 @@ fi esac ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3671,8 +4294,8 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -3694,7 +4317,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3713,21 +4336,22 @@ ;; esac done +IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3750,13 +4374,12 @@ fi # Check for --with-pydebug -echo "$as_me:$LINENO: checking for --with-pydebug" >&5 -echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5 +echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; } -# Check whether --with-pydebug or --without-pydebug was given. +# Check whether --with-pydebug was given. if test "${with_pydebug+set}" = set; then - withval="$with_pydebug" - + withval=$with_pydebug; if test "$withval" != no then @@ -3764,16 +4387,17 @@ #define Py_DEBUG 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; }; Py_DEBUG='true' -else echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; Py_DEBUG='false' +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; }; Py_DEBUG='false' fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be # merged with this chunk of code? @@ -3840,8 +4464,8 @@ # Python violates C99 rules, by casting between incompatible # pointer types. GCC may generate bad code as a result of that, # so use -fno-strict-aliasing if supported. - echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 -echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5 +echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; } ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" if test "$cross_compiling" = yes; then @@ -3856,13 +4480,22 @@ int main() { return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3875,11 +4508,13 @@ ( exit $ac_status ) ac_cv_no_strict_aliasing_ok=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" - echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5 -echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5 +echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; } if test $ac_cv_no_strict_aliasing_ok = yes then BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" @@ -3934,8 +4569,8 @@ ac_cv_opt_olimit_ok=no fi -echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5 -echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5 +echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; } if test "${ac_cv_opt_olimit_ok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3953,13 +4588,22 @@ int main() { return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3972,13 +4616,15 @@ ( exit $ac_status ) ac_cv_opt_olimit_ok=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" fi -echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5 -echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5 +echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; } if test $ac_cv_opt_olimit_ok = yes; then case $ac_sys_system in # XXX is this branch needed? On MacOSX 10.2.2 the result of the @@ -3991,8 +4637,8 @@ ;; esac else - echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 -echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5 +echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; } if test "${ac_cv_olimit_ok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4010,13 +4656,22 @@ int main() { return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4029,13 +4684,15 @@ ( exit $ac_status ) ac_cv_olimit_ok=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" fi - echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 -echo "${ECHO_T}$ac_cv_olimit_ok" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5 +echo "${ECHO_T}$ac_cv_olimit_ok" >&6; } if test $ac_cv_olimit_ok = yes; then BASECFLAGS="$BASECFLAGS -Olimit 1500" fi @@ -4044,8 +4701,8 @@ # Check whether GCC supports PyArg_ParseTuple format if test "$GCC" = "yes" then - echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5 -echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5 +echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -4066,43 +4723,39 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$save_CFLAGS fi @@ -4111,8 +4764,8 @@ # complain if unaccepted options are passed (e.g. gcc on Mac OS X). # So we have to see first whether pthreads are available without # options before we can check whether -Kpthread improves anything. -echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 -echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5 +echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; } if test "${ac_cv_pthread_is_default+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4140,13 +4793,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4163,13 +4825,15 @@ ( exit $ac_status ) ac_cv_pthread_is_default=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 -echo "${ECHO_T}$ac_cv_pthread_is_default" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5 +echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; } if test $ac_cv_pthread_is_default = yes @@ -4181,8 +4845,8 @@ # Some compilers won't report that they do not support -Kpthread, # so we need to run a program to see whether it really made the # function available. -echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 -echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5 +echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; } if test "${ac_cv_kpthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4212,13 +4876,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4231,13 +4904,15 @@ ( exit $ac_status ) ac_cv_kpthread=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" fi -echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 -echo "${ECHO_T}$ac_cv_kpthread" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5 +echo "${ECHO_T}$ac_cv_kpthread" >&6; } fi if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no @@ -4247,8 +4922,8 @@ # Some compilers won't report that they do not support -Kthread, # so we need to run a program to see whether it really made the # function available. -echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 -echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5 +echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; } if test "${ac_cv_kthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4278,13 +4953,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4297,13 +4981,15 @@ ( exit $ac_status ) ac_cv_kthread=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" fi -echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 -echo "${ECHO_T}$ac_cv_kthread" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5 +echo "${ECHO_T}$ac_cv_kthread" >&6; } fi if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no @@ -4313,8 +4999,8 @@ # Some compilers won't report that they do not support -pthread, # so we need to run a program to see whether it really made the # function available. -echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5 -echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5 +echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; } if test "${ac_cv_thread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4344,13 +5030,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4363,13 +5058,15 @@ ( exit $ac_status ) ac_cv_pthread=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + CC="$ac_save_cc" fi -echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 -echo "${ECHO_T}$ac_cv_pthread" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5 +echo "${ECHO_T}$ac_cv_pthread" >&6; } fi # If we have set a CC compiler flag for thread support then @@ -4377,8 +5074,8 @@ ac_cv_cxx_thread=no if test ! -z "$CXX" then -echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 -echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5 +echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; } ac_save_cxx="$CXX" if test "$ac_cv_kpthread" = "yes" @@ -4408,15 +5105,15 @@ fi rm -fr conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 -echo "${ECHO_T}$ac_cv_cxx_thread" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5 +echo "${ECHO_T}$ac_cv_cxx_thread" >&6; } fi CXX="$ac_save_cxx" # checks for header files -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4440,35 +5137,31 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -4524,6 +5217,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -4543,18 +5237,27 @@ for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4567,12 +5270,14 @@ ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -4595,9 +5300,9 @@ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4611,38 +5316,35 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -4716,18 +5418,19 @@ bluetooth/bluetooth.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4738,41 +5441,37 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4781,24 +5480,22 @@ /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -4806,9 +5503,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4832,25 +5530,24 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4870,9 +5567,9 @@ ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4894,38 +5591,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 @@ -4937,13 +5631,12 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4951,126 +5644,83 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); int main () { -opendir (); +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in dir; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5078,122 +5728,80 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char opendir (); int main () { -opendir (); +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in x; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_opendir+set}" = set; then + : +else + ac_cv_search_opendir=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi -echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 -echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 +echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; } if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5213,54 +5821,51 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_header_sys_types_h_makedev=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_sys_types_h_makedev=no + ac_cv_header_sys_types_h_makedev=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 +echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; } if test $ac_cv_header_sys_types_h_makedev = no; then if test "${ac_cv_header_sys_mkdev_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mkdev_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5271,41 +5876,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 -echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5314,24 +5915,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5339,9 +5938,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5365,25 +5965,23 @@ echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_mkdev_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_mkdev_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; } fi if test $ac_cv_header_sys_mkdev_h = yes; then @@ -5398,17 +5996,17 @@ if test $ac_cv_header_sys_mkdev_h = no; then if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 -echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 +echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5419,41 +6017,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 -echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5462,24 +6056,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5487,9 +6079,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -5513,25 +6106,23 @@ echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; } if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_sys_sysmacros_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; } fi if test $ac_cv_header_sys_sysmacros_h = yes; then @@ -5552,9 +6143,9 @@ for ac_header in term.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5572,38 +6163,35 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -5619,9 +6207,9 @@ for ac_header in linux/netlink.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -5642,38 +6230,35 @@ #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -5686,8 +6271,8 @@ # checks for typedefs was_it_defined=no -echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 -echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5 +echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5711,12 +6296,12 @@ fi rm -f conftest* -echo "$as_me:$LINENO: result: $was_it_defined" >&5 -echo "${ECHO_T}$was_it_defined" >&6 +{ echo "$as_me:$LINENO: result: $was_it_defined" >&5 +echo "${ECHO_T}$was_it_defined" >&6; } # Check whether using makedev requires defining _OSF_SOURCE -echo "$as_me:$LINENO: checking for makedev" >&5 -echo $ECHO_N "checking for makedev... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for makedev" >&5 +echo $ECHO_N "checking for makedev... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5733,35 +6318,32 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_has_makedev=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_has_makedev=no + ac_cv_has_makedev=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_has_makedev" = "no"; then # we didn't link, try if _OSF_SOURCE will allow us to link @@ -5784,35 +6366,32 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_has_makedev=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_has_makedev=no + ac_cv_has_makedev=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_has_makedev" = "yes"; then @@ -5822,8 +6401,8 @@ fi fi -echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 -echo "${ECHO_T}$ac_cv_has_makedev" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5 +echo "${ECHO_T}$ac_cv_has_makedev" >&6; } if test "$ac_cv_has_makedev" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -5840,8 +6419,8 @@ # work-around, disable LFS on such configurations use_lfs=yes -echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 -echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5 +echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5862,37 +6441,33 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then sol_lfs_bug=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -sol_lfs_bug=yes + sol_lfs_bug=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5 -echo "${ECHO_T}$sol_lfs_bug" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5 +echo "${ECHO_T}$sol_lfs_bug" >&6; } if test "$sol_lfs_bug" = "yes"; then use_lfs=no fi @@ -5920,8 +6495,8 @@ EOF # Type availability checks -echo "$as_me:$LINENO: checking for mode_t" >&5 -echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5932,50 +6507,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef mode_t ac__type_new_; int main () { -if ((mode_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (mode_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_mode_t=no + ac_cv_type_mode_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else @@ -5986,8 +6558,8 @@ fi -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -5998,62 +6570,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef off_t ac__type_new_; int main () { -if ((off_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (off_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_off_t=no + ac_cv_type_off_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define off_t long +#define off_t long int _ACEOF fi -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6064,50 +6633,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef pid_t ac__type_new_; int main () { -if ((pid_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (pid_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_pid_t=no + ac_cv_type_pid_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else @@ -6118,8 +6684,8 @@ fi -echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6131,64 +6697,52 @@ /* end confdefs.h. */ #include #include -#ifdef signal -# undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif int main () { -int i; +return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_signal=int + ac_cv_type_signal=void fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6199,62 +6753,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF -#define size_t unsigned +#define size_t unsigned int _ACEOF fi -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6276,8 +6827,8 @@ rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -6291,8 +6842,8 @@ fi -echo "$as_me:$LINENO: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6303,50 +6854,47 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef ssize_t ac__type_new_; int main () { -if ((ssize_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (ssize_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_ssize_t=no + ac_cv_type_ssize_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 -echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then cat >>confdefs.h <<\_ACEOF @@ -6358,8 +6906,8 @@ # Sizes of various common basic types # ANSI C requires sizeof(char) == 1, so no need to check it -echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6; } if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6370,61 +6918,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef int ac__type_new_; int main () { -if ((int *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (int)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_int=no + ac_cv_type_int=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6; } -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6; } if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -6434,10 +6978,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -6445,27 +6990,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -6475,10 +7015,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6486,56 +7027,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -6543,27 +7081,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -6573,10 +7106,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -6584,50 +7118,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -6638,10 +7170,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef int ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6649,52 +7182,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +'') if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6702,8 +7228,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } + typedef int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -6712,35 +7239,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -6751,29 +7287,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +if test "$ac_cv_type_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (int) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (int) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_int=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_int=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6; } if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -6784,61 +7323,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long ac__type_new_; int main () { -if ((long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long=no + ac_cv_type_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6; } -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -6848,10 +7383,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -6859,27 +7395,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -6889,10 +7420,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6900,56 +7432,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -6957,27 +7486,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -6987,10 +7511,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -6998,50 +7523,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -7052,10 +7575,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7063,52 +7587,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +'') if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7116,8 +7633,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } + typedef long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -7126,35 +7644,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7165,29 +7692,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +if test "$ac_cv_type_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF -echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for void *" >&5 +echo $ECHO_N "checking for void *... $ECHO_C" >&6; } if test "${ac_cv_type_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7198,61 +7728,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef void * ac__type_new_; int main () { -if ((void * *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (void *)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_void_p=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_void_p=no + ac_cv_type_void_p=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 +echo "${ECHO_T}$ac_cv_type_void_p" >&6; } -echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of void *" >&5 +echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } if test "${ac_cv_sizeof_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_void_p" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -7262,10 +7788,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -7273,27 +7800,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7303,10 +7825,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7314,56 +7837,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -7371,27 +7891,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7401,10 +7916,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7412,50 +7928,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -7466,10 +7980,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7477,52 +7992,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_void_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +'') if test "$ac_cv_type_void_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_void_p=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7530,8 +8038,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (void *)); } -unsigned long ulongval () { return (long) (sizeof (void *)); } + typedef void * ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -7540,35 +8049,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (void *))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (void *)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (void *)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7579,29 +8097,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 +if test "$ac_cv_type_void_p" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 +echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_void_p=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_void_p=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF -echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6; } if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -7612,61 +8133,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef short ac__type_new_; int main () { -if ((short *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (short)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_short=no + ac_cv_type_short=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6; } -echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6; } if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_short" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -7676,10 +8193,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -7687,27 +8205,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7717,10 +8230,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7728,56 +8242,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -7785,27 +8296,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7815,10 +8321,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -7826,50 +8333,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -7880,10 +8385,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef short ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -7891,52 +8397,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +'') if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_short=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7944,8 +8443,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (short)); } -unsigned long ulongval () { return (long) (sizeof (short)); } + typedef short ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -7954,35 +8454,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (short))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (short)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (short)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -7993,29 +8502,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +if test "$ac_cv_type_short" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (short) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (short) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_short=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_short=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF -echo "$as_me:$LINENO: checking for float" >&5 -echo $ECHO_N "checking for float... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for float" >&5 +echo $ECHO_N "checking for float... $ECHO_C" >&6; } if test "${ac_cv_type_float+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8026,61 +8538,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef float ac__type_new_; int main () { -if ((float *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (float)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_float=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_float=no + ac_cv_type_float=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 -echo "${ECHO_T}$ac_cv_type_float" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5 +echo "${ECHO_T}$ac_cv_type_float" >&6; } -echo "$as_me:$LINENO: checking size of float" >&5 -echo $ECHO_N "checking size of float... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of float" >&5 +echo $ECHO_N "checking size of float... $ECHO_C" >&6; } if test "${ac_cv_sizeof_float+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_float" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -8090,10 +8598,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef float ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8101,27 +8610,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8131,10 +8635,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef float ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8142,56 +8647,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef float ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -8199,27 +8701,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8229,10 +8726,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef float ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8240,50 +8738,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -8294,10 +8790,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef float ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8305,52 +8802,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_float=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77 +'') if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float), 77 +echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8358,8 +8848,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (float)); } -unsigned long ulongval () { return (long) (sizeof (float)); } + typedef float ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -8368,35 +8859,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (float))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (float)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (float)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8407,29 +8907,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77 +if test "$ac_cv_type_float" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (float) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (float), 77 +echo "$as_me: error: cannot compute sizeof (float) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_float=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_float=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 -echo "${ECHO_T}$ac_cv_sizeof_float" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5 +echo "${ECHO_T}$ac_cv_sizeof_float" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_FLOAT $ac_cv_sizeof_float _ACEOF -echo "$as_me:$LINENO: checking for double" >&5 -echo $ECHO_N "checking for double... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for double" >&5 +echo $ECHO_N "checking for double... $ECHO_C" >&6; } if test "${ac_cv_type_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8440,61 +8943,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef double ac__type_new_; int main () { -if ((double *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (double)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_double=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_double=no + ac_cv_type_double=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5 -echo "${ECHO_T}$ac_cv_type_double" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5 +echo "${ECHO_T}$ac_cv_type_double" >&6; } -echo "$as_me:$LINENO: checking size of double" >&5 -echo $ECHO_N "checking size of double... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of double" >&5 +echo $ECHO_N "checking size of double... $ECHO_C" >&6; } if test "${ac_cv_sizeof_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_double" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -8504,10 +9003,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8515,27 +9015,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8545,10 +9040,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8556,56 +9052,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -8613,27 +9106,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8643,10 +9131,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8654,50 +9143,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -8708,10 +9195,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef double ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8719,52 +9207,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_double=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 +'') if test "$ac_cv_type_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double), 77 +echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_double=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8772,8 +9253,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (double)); } -unsigned long ulongval () { return (long) (sizeof (double)); } + typedef double ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -8782,35 +9264,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (double))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (double)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (double)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -8821,29 +9312,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 +if test "$ac_cv_type_double" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (double) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (double), 77 +echo "$as_me: error: cannot compute sizeof (double) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_double=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_double=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 -echo "${ECHO_T}$ac_cv_sizeof_double" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5 +echo "${ECHO_T}$ac_cv_sizeof_double" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_DOUBLE $ac_cv_sizeof_double _ACEOF -echo "$as_me:$LINENO: checking for fpos_t" >&5 -echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for fpos_t" >&5 +echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; } if test "${ac_cv_type_fpos_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -8854,61 +9348,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef fpos_t ac__type_new_; int main () { -if ((fpos_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (fpos_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_fpos_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_fpos_t=no + ac_cv_type_fpos_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5 -echo "${ECHO_T}$ac_cv_type_fpos_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5 +echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; } -echo "$as_me:$LINENO: checking size of fpos_t" >&5 -echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of fpos_t" >&5 +echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_fpos_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_fpos_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -8918,10 +9408,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef fpos_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -8929,27 +9420,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -8959,10 +9445,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef fpos_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8970,56 +9457,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef fpos_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9027,27 +9511,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9057,10 +9536,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef fpos_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9068,50 +9548,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -9122,10 +9600,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef fpos_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9133,52 +9612,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_fpos_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77 +'') if test "$ac_cv_type_fpos_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (fpos_t), 77 +echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_fpos_t=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9186,8 +9658,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (fpos_t)); } -unsigned long ulongval () { return (long) (sizeof (fpos_t)); } + typedef fpos_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -9196,35 +9669,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (fpos_t))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (fpos_t)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (fpos_t)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9235,29 +9717,32 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77 +if test "$ac_cv_type_fpos_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (fpos_t), 77 +echo "$as_me: error: cannot compute sizeof (fpos_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_fpos_t=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_fpos_t=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t _ACEOF -echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9268,61 +9753,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef size_t ac__type_new_; int main () { -if ((size_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (size_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_size_t=no + ac_cv_type_size_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -echo "$as_me:$LINENO: checking size of size_t" >&5 -echo $ECHO_N "checking size of size_t... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of size_t" >&5 +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_size_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -9332,10 +9813,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef size_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9343,27 +9825,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9373,10 +9850,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef size_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9384,56 +9862,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef size_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9441,27 +9916,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9471,10 +9941,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef size_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9482,50 +9953,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -9536,10 +10005,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef size_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9547,52 +10017,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_size_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77 +'') if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t), 77 +echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9600,8 +10063,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (size_t)); } -unsigned long ulongval () { return (long) (sizeof (size_t)); } + typedef size_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -9610,35 +10074,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (size_t))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (size_t)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (size_t)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -9649,30 +10122,33 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77 +if test "$ac_cv_type_size_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_t), 77 +echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_size_t=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_size_t=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF -echo "$as_me:$LINENO: checking for long long support" >&5 -echo $ECHO_N "checking for long long support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long long support" >&5 +echo $ECHO_N "checking for long long support... $ECHO_C" >&6; } have_long_long=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9690,27 +10166,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF @@ -9723,13 +10194,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $have_long_long" >&5 -echo "${ECHO_T}$have_long_long" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_long_long" >&5 +echo "${ECHO_T}$have_long_long" >&6; } if test "$have_long_long" = yes ; then -echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6; } if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -9740,61 +10213,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef long long ac__type_new_; int main () { -if ((long long *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (long long)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long_long=no + ac_cv_type_long_long=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6; } -echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -9804,10 +10273,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -9815,27 +10285,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9845,10 +10310,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9856,56 +10322,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -9913,27 +10376,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -9943,10 +10401,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9954,50 +10413,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -10008,10 +10465,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef long long ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10019,52 +10477,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +'') if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10072,8 +10523,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long long)); } -unsigned long ulongval () { return (long) (sizeof (long long)); } + typedef long long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -10082,35 +10534,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (long long))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (long long)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long long)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10121,22 +10582,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +if test "$ac_cv_type_long_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long long) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_long_long=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_long_long=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF @@ -10144,8 +10608,8 @@ fi -echo "$as_me:$LINENO: checking for _Bool support" >&5 -echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for _Bool support" >&5 +echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; } have_c99_bool=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10163,27 +10627,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF @@ -10196,13 +10655,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $have_c99_bool" >&5 -echo "${ECHO_T}$have_c99_bool" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5 +echo "${ECHO_T}$have_c99_bool" >&6; } if test "$have_c99_bool" = yes ; then -echo "$as_me:$LINENO: checking for _Bool" >&5 -echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for _Bool" >&5 +echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } if test "${ac_cv_type__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10213,61 +10674,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef _Bool ac__type_new_; int main () { -if ((_Bool *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (_Bool)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type__Bool=no + ac_cv_type__Bool=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 +echo "${ECHO_T}$ac_cv_type__Bool" >&6; } -echo "$as_me:$LINENO: checking size of _Bool" >&5 -echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of _Bool" >&5 +echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; } if test "${ac_cv_sizeof__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type__Bool" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -10277,10 +10734,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10288,27 +10746,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10318,10 +10771,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10329,56 +10783,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10386,27 +10837,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10416,10 +10862,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10427,50 +10874,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -10481,10 +10926,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef _Bool ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10492,52 +10938,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof__Bool=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool), 77 +'') if test "$ac_cv_type__Bool" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (_Bool), 77 +echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof__Bool=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10545,8 +10984,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (_Bool)); } -unsigned long ulongval () { return (long) (sizeof (_Bool)); } + typedef _Bool ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -10555,35 +10995,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (_Bool))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (_Bool)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (_Bool)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -10594,22 +11043,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool), 77 +if test "$ac_cv_type__Bool" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (_Bool), 77 +echo "$as_me: error: cannot compute sizeof (_Bool) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof__Bool=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof__Bool=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 -echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5 +echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF__BOOL $ac_cv_sizeof__Bool _ACEOF @@ -10617,8 +11069,8 @@ fi -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10632,58 +11084,55 @@ #include #endif +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } if test $ac_cv_type_uintptr_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_UINTPTR_T 1 _ACEOF -echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_type_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -10694,61 +11143,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default +typedef uintptr_t ac__type_new_; int main () { -if ((uintptr_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (uintptr_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_uintptr_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_uintptr_t=no + ac_cv_type_uintptr_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } -echo "$as_me:$LINENO: checking size of uintptr_t" >&5 -echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5 +echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_uintptr_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_uintptr_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -10758,10 +11203,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -10769,27 +11215,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10799,10 +11240,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10810,56 +11252,53 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -10867,27 +11306,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -10897,10 +11331,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10908,50 +11343,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -10962,10 +11395,11 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default + typedef uintptr_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10973,52 +11407,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_uintptr_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77 +'') if test "$ac_cv_type_uintptr_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (uintptr_t), 77 +echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_uintptr_t=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11026,8 +11453,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (uintptr_t)); } -unsigned long ulongval () { return (long) (sizeof (uintptr_t)); } + typedef uintptr_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -11036,35 +11464,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (uintptr_t))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (uintptr_t)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (uintptr_t)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11075,22 +11512,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77 +if test "$ac_cv_type_uintptr_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (uintptr_t), 77 +echo "$as_me: error: cannot compute sizeof (uintptr_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_uintptr_t=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_uintptr_t=0 fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t _ACEOF @@ -11101,8 +11541,8 @@ # Hmph. AC_CHECK_SIZEOF() doesn't include . -echo "$as_me:$LINENO: checking size of off_t" >&5 -echo $ECHO_N "checking size of off_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of off_t" >&5 +echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11126,13 +11566,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11145,21 +11594,23 @@ ( exit $ac_status ) ac_cv_sizeof_off_t=0 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF -echo "$as_me:$LINENO: checking whether to enable large file support" >&5 -echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5 +echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; } if test "$have_long_long" = yes -a \ "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then @@ -11168,16 +11619,16 @@ #define HAVE_LARGEFILE_SUPPORT 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi # AC_CHECK_SIZEOF() doesn't include . -echo "$as_me:$LINENO: checking size of time_t" >&5 -echo $ECHO_N "checking size of time_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking size of time_t" >&5 +echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_time_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11201,13 +11652,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11220,13 +11680,15 @@ ( exit $ac_status ) ac_cv_sizeof_time_t=0 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_TIME_T $ac_cv_sizeof_time_t @@ -11243,8 +11705,8 @@ elif test "$ac_cv_pthread" = "yes" then CC="$CC -pthread" fi -echo "$as_me:$LINENO: checking for pthread_t" >&5 -echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for pthread_t" >&5 +echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; } have_pthread_t=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -11262,40 +11724,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then have_pthread_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $have_pthread_t" >&5 -echo "${ECHO_T}$have_pthread_t" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5 +echo "${ECHO_T}$have_pthread_t" >&6; } if test "$have_pthread_t" = yes ; then # AC_CHECK_SIZEOF() doesn't include . - echo "$as_me:$LINENO: checking size of pthread_t" >&5 -echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking size of pthread_t" >&5 +echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_pthread_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11319,13 +11778,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -11338,13 +11806,15 @@ ( exit $ac_status ) ac_cv_sizeof_pthread_t=0 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi - echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t @@ -11353,13 +11823,13 @@ fi CC="$ac_save_cc" -echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5 -echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6 -# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. +{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5 +echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; } +# Check whether --enable-toolbox-glue was given. if test "${enable_toolbox_glue+set}" = set; then - enableval="$enable_toolbox_glue" + enableval=$enable_toolbox_glue; +fi -fi; if test -z "$enable_toolbox_glue" then @@ -11385,8 +11855,8 @@ extra_undefs="" ;; esac -echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5 -echo "${ECHO_T}$enable_toolbox_glue" >&6 +{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5 +echo "${ECHO_T}$enable_toolbox_glue" >&6; } case $ac_sys_system/$ac_sys_release in @@ -11422,8 +11892,8 @@ LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac -echo "$as_me:$LINENO: checking for --enable-framework" >&5 -echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --enable-framework" >&5 +echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; } if test "$enable_framework" then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" @@ -11434,15 +11904,15 @@ #define WITH_NEXT_FRAMEWORK 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo "$as_me:$LINENO: checking for dyld" >&5 -echo $ECHO_N "checking for dyld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dyld" >&5 +echo $ECHO_N "checking for dyld... $ECHO_C" >&6; } case $ac_sys_system/$ac_sys_release in Darwin/*) @@ -11450,12 +11920,12 @@ #define WITH_DYLD 1 _ACEOF - echo "$as_me:$LINENO: result: always on for Darwin" >&5 -echo "${ECHO_T}always on for Darwin" >&6 + { echo "$as_me:$LINENO: result: always on for Darwin" >&5 +echo "${ECHO_T}always on for Darwin" >&6; } ;; *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ;; esac @@ -11467,8 +11937,8 @@ # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin -echo "$as_me:$LINENO: checking SO" >&5 -echo $ECHO_N "checking SO... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking SO" >&5 +echo $ECHO_N "checking SO... $ECHO_C" >&6; } if test -z "$SO" then case $ac_sys_system in @@ -11493,8 +11963,8 @@ echo '=====================================================================' sleep 10 fi -echo "$as_me:$LINENO: result: $SO" >&5 -echo "${ECHO_T}$SO" >&6 +{ echo "$as_me:$LINENO: result: $SO" >&5 +echo "${ECHO_T}$SO" >&6; } cat >>confdefs.h <<_ACEOF #define SHLIB_EXT "$SO" @@ -11504,8 +11974,8 @@ # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 # (Shared libraries in this instance are shared modules to be loaded into # Python, as opposed to building Python itself as a shared library.) -echo "$as_me:$LINENO: checking LDSHARED" >&5 -echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking LDSHARED" >&5 +echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; } if test -z "$LDSHARED" then case $ac_sys_system/$ac_sys_release in @@ -11612,13 +12082,13 @@ *) LDSHARED="ld";; esac fi -echo "$as_me:$LINENO: result: $LDSHARED" >&5 -echo "${ECHO_T}$LDSHARED" >&6 +{ echo "$as_me:$LINENO: result: $LDSHARED" >&5 +echo "${ECHO_T}$LDSHARED" >&6; } BLDSHARED=${BLDSHARED-$LDSHARED} # CCSHARED are the C *flags* used to create objects to go into a shared # library (module) -- this is only needed for a few systems -echo "$as_me:$LINENO: checking CCSHARED" >&5 -echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking CCSHARED" >&5 +echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; } if test -z "$CCSHARED" then case $ac_sys_system/$ac_sys_release in @@ -11653,12 +12123,12 @@ atheos*) CCSHARED="-fPIC";; esac fi -echo "$as_me:$LINENO: result: $CCSHARED" >&5 -echo "${ECHO_T}$CCSHARED" >&6 +{ echo "$as_me:$LINENO: result: $CCSHARED" >&5 +echo "${ECHO_T}$CCSHARED" >&6; } # LINKFORSHARED are the flags passed to the $(CC) command that links # the python executable -- this is only needed for a few systems -echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 -echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 +echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; } if test -z "$LINKFORSHARED" then case $ac_sys_system/$ac_sys_release in @@ -11706,12 +12176,12 @@ fi;; esac fi -echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 -echo "${ECHO_T}$LINKFORSHARED" >&6 +{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5 +echo "${ECHO_T}$LINKFORSHARED" >&6; } -echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 -echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5 +echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; } if test ! "$LIBRARY" = "$LDLIBRARY" then case $ac_sys_system in @@ -11723,8 +12193,8 @@ CFLAGSFORSHARED='$(CCSHARED)' esac fi -echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 -echo "${ECHO_T}$CFLAGSFORSHARED" >&6 +{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5 +echo "${ECHO_T}$CFLAGSFORSHARED" >&6; } # SHLIBS are libraries (except -lc and -lm) to link to the python shared # library (with --enable-shared). @@ -11735,20 +12205,20 @@ # don't need to link LIBS explicitly. The default should be only changed # on systems where this approach causes problems. -echo "$as_me:$LINENO: checking SHLIBS" >&5 -echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking SHLIBS" >&5 +echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; } case "$ac_sys_system" in *) SHLIBS='$(LIBS)';; esac -echo "$as_me:$LINENO: result: $SHLIBS" >&5 -echo "${ECHO_T}$SHLIBS" >&6 +{ echo "$as_me:$LINENO: result: $SHLIBS" >&5 +echo "${ECHO_T}$SHLIBS" >&6; } # checks for libraries -echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11761,56 +12231,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 @@ -11821,8 +12288,8 @@ fi # Dynamic linking for SunOS/Solaris and SYSV -echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -11835,56 +12302,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDLD 1 @@ -11897,13 +12361,12 @@ # only check for sem_ini if thread support is requested if test "$with_threads" = "yes" -o -z "$with_threads"; then - echo "$as_me:$LINENO: checking for library containing sem_init" >&5 -echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for library containing sem_init" >&5 +echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; } if test "${ac_cv_search_sem_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_sem_init=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11911,115 +12374,73 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char sem_init (); int main () { -sem_init (); +return sem_init (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' pthread rt posix4; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_sem_init="none required" + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_sem_init=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_sem_init" = no; then - for ac_lib in pthread rt posix4; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char sem_init (); -int -main () -{ -sem_init (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_sem_init="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_sem_init+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_sem_init+set}" = set; then + : +else + ac_cv_search_sem_init=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5 -echo "${ECHO_T}$ac_cv_search_sem_init" >&6 -if test "$ac_cv_search_sem_init" != no; then - test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS" +{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5 +echo "${ECHO_T}$ac_cv_search_sem_init" >&6; } +ac_res=$ac_cv_search_sem_init +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # 'Real Time' functions on Solaris @@ -12028,8 +12449,8 @@ fi # check if we need libintl for locale functions -echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 -echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 +echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_textdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12042,56 +12463,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char textdomain (); int main () { -textdomain (); +return textdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_textdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_intl_textdomain=no + ac_cv_lib_intl_textdomain=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 +echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; } if test $ac_cv_lib_intl_textdomain = yes; then cat >>confdefs.h <<\_ACEOF @@ -12103,8 +12521,8 @@ # checks for system dependent C++ extensions support case "$ac_sys_system" in - AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 -echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6 + AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 +echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12121,50 +12539,47 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define AIX_GENUINE_CPLUSPLUS 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext;; *) ;; esac # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. # BeOS' sockets are stashed in libnet. -echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 -echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 +echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; } if test "${ac_cv_lib_nsl_t_open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12177,62 +12592,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char t_open (); int main () { -t_open (); +return t_open (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_t_open=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_nsl_t_open=no + ac_cv_lib_nsl_t_open=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; } if test $ac_cv_lib_nsl_t_open = yes; then LIBS="-lnsl $LIBS" fi # SVR4 -echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 -echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; } if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12245,56 +12657,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char socket (); int main () { -socket (); +return socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_socket_socket=no + ac_cv_lib_socket_socket=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; } if test $ac_cv_lib_socket_socket = yes; then LIBS="-lsocket $LIBS" fi @@ -12302,8 +12711,8 @@ case "$ac_sys_system" in BeOS*) -echo "$as_me:$LINENO: checking for socket in -lnet" >&5 -echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5 +echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; } if test "${ac_cv_lib_net_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -12316,56 +12725,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char socket (); int main () { -socket (); +return socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_net_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_net_socket=no + ac_cv_lib_net_socket=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5 -echo "${ECHO_T}$ac_cv_lib_net_socket" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; } if test $ac_cv_lib_net_socket = yes; then LIBS="-lnet $LIBS" fi @@ -12373,55 +12779,55 @@ ;; esac -echo "$as_me:$LINENO: checking for --with-libs" >&5 -echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-libs" >&5 +echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; } -# Check whether --with-libs or --without-libs was given. +# Check whether --with-libs was given. if test "${with_libs+set}" = set; then - withval="$with_libs" - -echo "$as_me:$LINENO: result: $withval" >&5 -echo "${ECHO_T}$withval" >&6 + withval=$with_libs; +{ echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } LIBS="$withval $LIBS" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + # Check for use of the system libffi library -echo "$as_me:$LINENO: checking for --with-system-ffi" >&5 -echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5 +echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; } -# Check whether --with-system_ffi or --without-system_ffi was given. +# Check whether --with-system_ffi was given. if test "${with_system_ffi+set}" = set; then - withval="$with_system_ffi" + withval=$with_system_ffi; +fi -fi; if test -z "$with_system_ffi" then with_system_ffi="no" fi -echo "$as_me:$LINENO: result: $with_system_ffi" >&5 -echo "${ECHO_T}$with_system_ffi" >&6 +{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5 +echo "${ECHO_T}$with_system_ffi" >&6; } # Determine if signalmodule should be used. -echo "$as_me:$LINENO: checking for --with-signal-module" >&5 -echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5 +echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; } -# Check whether --with-signal-module or --without-signal-module was given. +# Check whether --with-signal-module was given. if test "${with_signal_module+set}" = set; then - withval="$with_signal_module" + withval=$with_signal_module; +fi -fi; if test -z "$with_signal_module" then with_signal_module="yes" fi -echo "$as_me:$LINENO: result: $with_signal_module" >&5 -echo "${ECHO_T}$with_signal_module" >&6 +{ echo "$as_me:$LINENO: result: $with_signal_module" >&5 +echo "${ECHO_T}$with_signal_module" >&6; } if test "${with_signal_module}" = "yes"; then USE_SIGNAL_MODULE="" @@ -12435,24 +12841,24 @@ USE_THREAD_MODULE="" -echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 -echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5 +echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; } -# Check whether --with-dec-threads or --without-dec-threads was given. +# Check whether --with-dec-threads was given. if test "${with_dec_threads+set}" = set; then - withval="$with_dec_threads" - -echo "$as_me:$LINENO: result: $withval" >&5 -echo "${ECHO_T}$withval" >&6 + withval=$with_dec_threads; +{ echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } LDLAST=-threads if test "${with_thread+set}" != set; then with_thread="$withval"; fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + # Templates for things AC_DEFINEd more than once. # For a single AC_DEFINE, no template is needed. @@ -12463,28 +12869,28 @@ -echo "$as_me:$LINENO: checking for --with-threads" >&5 -echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-threads" >&5 +echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; } -# Check whether --with-threads or --without-threads was given. +# Check whether --with-threads was given. if test "${with_threads+set}" = set; then - withval="$with_threads" + withval=$with_threads; +fi -fi; # --with-thread is deprecated, but check for it anyway -# Check whether --with-thread or --without-thread was given. +# Check whether --with-thread was given. if test "${with_thread+set}" = set; then - withval="$with_thread" - with_threads=$with_thread -fi; + withval=$with_thread; with_threads=$with_thread +fi + if test -z "$with_threads" then with_threads="yes" fi -echo "$as_me:$LINENO: result: $with_threads" >&5 -echo "${ECHO_T}$with_threads" >&6 +{ echo "$as_me:$LINENO: result: $with_threads" >&5 +echo "${ECHO_T}$with_threads" >&6; } if test "$with_threads" = "no" @@ -12550,8 +12956,8 @@ # According to the POSIX spec, a pthreads implementation must # define _POSIX_THREADS in unistd.h. Some apparently don't # (e.g. gnu pth with pthread emulation) - echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5 -echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5 +echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12573,25 +12979,25 @@ fi rm -f conftest* - echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 -echo "${ECHO_T}$unistd_defines_pthreads" >&6 + { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5 +echo "${ECHO_T}$unistd_defines_pthreads" >&6; } cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF if test "${ac_cv_header_cthreads_h+set}" = set; then - echo "$as_me:$LINENO: checking for cthreads.h" >&5 -echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for cthreads.h" >&5 +echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; } if test "${ac_cv_header_cthreads_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 +echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking cthreads.h usability" >&5 -echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5 +echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12602,41 +13008,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking cthreads.h presence" >&5 -echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5 +echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12645,24 +13047,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12670,9 +13070,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12696,25 +13097,23 @@ echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for cthreads.h" >&5 -echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for cthreads.h" >&5 +echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; } if test "${ac_cv_header_cthreads_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_cthreads_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5 +echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; } fi if test $ac_cv_header_cthreads_h = yes; then @@ -12736,17 +13135,17 @@ else if test "${ac_cv_header_mach_cthreads_h+set}" = set; then - echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 -echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 +echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; } if test "${ac_cv_header_mach_cthreads_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 +echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5 -echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5 +echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12757,41 +13156,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5 -echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5 +echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12800,24 +13195,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -12825,9 +13218,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -12851,25 +13245,23 @@ echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 -echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5 +echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; } if test "${ac_cv_header_mach_cthreads_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_mach_cthreads_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 -echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5 +echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; } fi if test $ac_cv_header_mach_cthreads_h = yes; then @@ -12889,14 +13281,13 @@ THREADOBJ="Python/thread.o" else - echo "$as_me:$LINENO: checking for --with-pth" >&5 -echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for --with-pth" >&5 +echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; } -# Check whether --with-pth or --without-pth was given. +# Check whether --with-pth was given. if test "${with_pth+set}" = set; then - withval="$with_pth" - echo "$as_me:$LINENO: result: $withval" >&5 -echo "${ECHO_T}$withval" >&6 + withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5 +echo "${ECHO_T}$withval" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -12909,16 +13300,16 @@ LIBS="-lpth $LIBS" THREADOBJ="Python/thread.o" else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } # Just looking for pthread_create in libpthread is not enough: # on HP/UX, pthread.h renames pthread_create to a different symbol name. # So we really have to include pthread.h, and then link. _libs=$LIBS LIBS="$LIBS -lpthread" - echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 -echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12938,30 +13329,26 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 _ACEOF @@ -12974,8 +13361,8 @@ LIBS=$_libs - echo "$as_me:$LINENO: checking for pthread_detach" >&5 -echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_detach" >&5 +echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; } if test "${ac_cv_func_pthread_detach+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13002,68 +13389,59 @@ #undef pthread_detach -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_detach (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) +#if defined __stub_pthread_detach || defined __stub___pthread_detach choke me -#else -char (*f) () = pthread_detach; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != pthread_detach; +return pthread_detach (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_pthread_detach=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_pthread_detach=no + ac_cv_func_pthread_detach=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5 -echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5 +echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; } if test $ac_cv_func_pthread_detach = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13074,17 +13452,17 @@ else if test "${ac_cv_header_atheos_threads_h+set}" = set; then - echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 -echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 +echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; } if test "${ac_cv_header_atheos_threads_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 +echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5 -echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5 +echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13095,41 +13473,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5 -echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5 +echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13138,24 +13512,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13163,9 +13535,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13189,25 +13562,23 @@ echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 -echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5 +echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; } if test "${ac_cv_header_atheos_threads_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_atheos_threads_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 -echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5 +echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; } fi if test $ac_cv_header_atheos_threads_h = yes; then @@ -13224,17 +13595,17 @@ else if test "${ac_cv_header_kernel_OS_h+set}" = set; then - echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 -echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 +echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; } if test "${ac_cv_header_kernel_OS_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 -echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 +echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5 -echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5 +echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13245,41 +13616,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5 -echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5 +echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13288,24 +13655,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -13313,9 +13678,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -13339,25 +13705,23 @@ echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 -echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5 +echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; } if test "${ac_cv_header_kernel_OS_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_kernel_OS_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 -echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5 +echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; } fi if test $ac_cv_header_kernel_OS_h = yes; then @@ -13373,8 +13737,8 @@ THREADOBJ="Python/thread.o" else - echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5 -echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5 +echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; } if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13387,56 +13751,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_create (); int main () { -pthread_create (); +return pthread_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthreads_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthreads_pthread_create=no + ac_cv_lib_pthreads_pthread_create=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; } if test $ac_cv_lib_pthreads_pthread_create = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13447,8 +13808,8 @@ THREADOBJ="Python/thread.o" else - echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 -echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 +echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; } if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13461,56 +13822,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_create (); int main () { -pthread_create (); +return pthread_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_r_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_r_pthread_create=no + ac_cv_lib_c_r_pthread_create=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; } if test $ac_cv_lib_c_r_pthread_create = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13521,8 +13879,8 @@ THREADOBJ="Python/thread.o" else - echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 -echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5 +echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13535,56 +13893,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __pthread_create_system (); int main () { -__pthread_create_system (); +return __pthread_create_system (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_pthread___pthread_create_system=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pthread___pthread_create_system=no + ac_cv_lib_pthread___pthread_create_system=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 -echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5 +echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; } if test $ac_cv_lib_pthread___pthread_create_system = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13595,8 +13950,8 @@ THREADOBJ="Python/thread.o" else - echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5 -echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5 +echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; } if test "${ac_cv_lib_cma_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13609,56 +13964,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char pthread_create (); int main () { -pthread_create (); +return pthread_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_cma_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_cma_pthread_create=no + ac_cv_lib_cma_pthread_create=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5 -echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5 +echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; } if test $ac_cv_lib_cma_pthread_create = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13688,9 +14040,11 @@ fi fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -fi; +fi + fi @@ -13698,8 +14052,8 @@ - echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 -echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5 +echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; } if test "${ac_cv_lib_mpc_usconfig+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13712,56 +14066,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char usconfig (); int main () { -usconfig (); +return usconfig (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_mpc_usconfig=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_mpc_usconfig=no + ac_cv_lib_mpc_usconfig=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5 -echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5 +echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; } if test $ac_cv_lib_mpc_usconfig = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13774,8 +14125,8 @@ if test "$posix_threads" != "yes"; then - echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 -echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 +echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; } if test "${ac_cv_lib_thread_thr_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13788,56 +14139,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char thr_create (); int main () { -thr_create (); +return thr_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_thread_thr_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_thread_thr_create=no + ac_cv_lib_thread_thr_create=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 -echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 +echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; } if test $ac_cv_lib_thread_thr_create = yes; then cat >>confdefs.h <<\_ACEOF #define WITH_THREAD 1 @@ -13885,8 +14233,8 @@ ;; esac - echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 -echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 +echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; } if test "${ac_cv_pthread_system_supported+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -13913,13 +14261,22 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -13932,13 +14289,15 @@ ( exit $ac_status ) ac_cv_pthread_system_supported=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi - echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 -echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5 +echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; } if test "$ac_cv_pthread_system_supported" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -13950,9 +14309,9 @@ for ac_func in pthread_sigmask do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -13978,68 +14337,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -14062,19 +14413,18 @@ # Check for enable-ipv6 -echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5 -echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6 -# Check whether --enable-ipv6 or --disable-ipv6 was given. +{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5 +echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; } +# Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then - enableval="$enable_ipv6" - case "$enableval" in + enableval=$enable_ipv6; case "$enableval" in no) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no ;; - *) echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + *) { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_IPV6 1 _ACEOF @@ -14085,8 +14435,8 @@ else if test "$cross_compiling" = yes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no else @@ -14109,18 +14459,27 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ipv6=yes else echo "$as_me: program exited with status $ac_status" >&5 @@ -14128,16 +14487,18 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test "$ipv6" = "yes"; then - echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5 -echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5 +echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14156,39 +14517,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } ipv6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } ipv6=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$ipv6" = "yes"; then @@ -14198,15 +14555,16 @@ fi -fi; +fi + ipv6type=unknown ipv6lib=none ipv6trylibc=no if test "$ipv6" = "yes"; then - echo "$as_me:$LINENO: checking ipv6 stack type" >&5 -echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking ipv6 stack type" >&5 +echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; } for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do case $i in @@ -14362,8 +14720,8 @@ break fi done - echo "$as_me:$LINENO: result: $ipv6type" >&5 -echo "${ECHO_T}$ipv6type" >&6 + { echo "$as_me:$LINENO: result: $ipv6type" >&5 +echo "${ECHO_T}$ipv6type" >&6; } fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -14383,14 +14741,14 @@ fi # Check for --with-doc-strings -echo "$as_me:$LINENO: checking for --with-doc-strings" >&5 -echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5 +echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; } -# Check whether --with-doc-strings or --without-doc-strings was given. +# Check whether --with-doc-strings was given. if test "${with_doc_strings+set}" = set; then - withval="$with_doc_strings" + withval=$with_doc_strings; +fi -fi; if test -z "$with_doc_strings" then with_doc_strings="yes" @@ -14403,17 +14761,16 @@ _ACEOF fi -echo "$as_me:$LINENO: result: $with_doc_strings" >&5 -echo "${ECHO_T}$with_doc_strings" >&6 +{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5 +echo "${ECHO_T}$with_doc_strings" >&6; } # Check for Python-specific malloc support -echo "$as_me:$LINENO: checking for --with-tsc" >&5 -echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-tsc" >&5 +echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; } -# Check whether --with-tsc or --without-tsc was given. +# Check whether --with-tsc was given. if test "${with_tsc+set}" = set; then - withval="$with_tsc" - + withval=$with_tsc; if test "$withval" != no then @@ -14421,25 +14778,26 @@ #define WITH_TSC 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + # Check for Python-specific malloc support -echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 -echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5 +echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; } -# Check whether --with-pymalloc or --without-pymalloc was given. +# Check whether --with-pymalloc was given. if test "${with_pymalloc+set}" = set; then - withval="$with_pymalloc" + withval=$with_pymalloc; +fi -fi; if test -z "$with_pymalloc" then with_pymalloc="yes" @@ -14452,17 +14810,16 @@ _ACEOF fi -echo "$as_me:$LINENO: result: $with_pymalloc" >&5 -echo "${ECHO_T}$with_pymalloc" >&6 +{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5 +echo "${ECHO_T}$with_pymalloc" >&6; } # Check for --with-wctype-functions -echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5 -echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5 +echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; } -# Check whether --with-wctype-functions or --without-wctype-functions was given. +# Check whether --with-wctype-functions was given. if test "${with_wctype_functions+set}" = set; then - withval="$with_wctype_functions" - + withval=$with_wctype_functions; if test "$withval" != no then @@ -14470,15 +14827,16 @@ #define WANT_WCTYPE_FUNCTIONS 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + # -I${DLINCLDIR} is added to the compile rule for importdl.o @@ -14490,9 +14848,9 @@ for ac_func in dlopen do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -14518,68 +14876,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -14592,8 +14942,8 @@ # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic # loading of modules. -echo "$as_me:$LINENO: checking DYNLOADFILE" >&5 -echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5 +echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; } if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in @@ -14618,8 +14968,8 @@ ;; esac fi -echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 -echo "${ECHO_T}$DYNLOADFILE" >&6 +{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5 +echo "${ECHO_T}$DYNLOADFILE" >&6; } if test "$DYNLOADFILE" != "dynload_stub.o" then @@ -14632,16 +14982,16 @@ # MACHDEP_OBJS can be set to platform-specific object files needed by Python -echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5 -echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5 +echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; } if test -z "$MACHDEP_OBJS" then MACHDEP_OBJS=$extra_machdep_objs else MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" fi -echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 -echo "${ECHO_T}MACHDEP_OBJS" >&6 +{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5 +echo "${ECHO_T}MACHDEP_OBJS" >&6; } # checks for library functions @@ -14736,9 +15086,9 @@ truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -14764,68 +15114,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -14837,8 +15179,8 @@ # For some functions, having a definition is not sufficient, since # we want to take their address. -echo "$as_me:$LINENO: checking for chroot" >&5 -echo $ECHO_N "checking for chroot... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for chroot" >&5 +echo $ECHO_N "checking for chroot... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14855,45 +15197,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_CHROOT 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for link" >&5 -echo $ECHO_N "checking for link... $ECHO_C" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for link" >&5 +echo $ECHO_N "checking for link... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14910,45 +15248,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_LINK 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for symlink" >&5 -echo $ECHO_N "checking for symlink... $ECHO_C" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for symlink" >&5 +echo $ECHO_N "checking for symlink... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14965,45 +15299,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYMLINK 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for fchdir" >&5 -echo $ECHO_N "checking for fchdir... $ECHO_C" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for fchdir" >&5 +echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15020,45 +15350,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_FCHDIR 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for fsync" >&5 -echo $ECHO_N "checking for fsync... $ECHO_C" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for fsync" >&5 +echo $ECHO_N "checking for fsync... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15075,45 +15401,41 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_FSYNC 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for fdatasync" >&5 -echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: checking for fdatasync" >&5 +echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15130,43 +15452,39 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_FDATASYNC 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # On some systems (eg. FreeBSD 5), we would find a definition of the # functions ctermid_r, setgroups in the library, but no prototype @@ -15174,8 +15492,8 @@ # address to avoid compiler warnings and potential miscompilations # because of the missing prototypes. -echo "$as_me:$LINENO: checking for ctermid_r" >&5 -echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for ctermid_r" >&5 +echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15195,46 +15513,42 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_CTERMID_R 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for flock" >&5 -echo $ECHO_N "checking for flock... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking for flock" >&5 +echo $ECHO_N "checking for flock... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15254,46 +15568,42 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_FLOCK 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for getpagesize" >&5 -echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking for getpagesize" >&5 +echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15313,50 +15623,46 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext for ac_prog in true do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_TRUE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15369,32 +15675,34 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_TRUE="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then - echo "$as_me:$LINENO: result: $TRUE" >&5 -echo "${ECHO_T}$TRUE" >&6 + { echo "$as_me:$LINENO: result: $TRUE" >&5 +echo "${ECHO_T}$TRUE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$TRUE" && break done test -n "$TRUE" || TRUE="/bin/true" -echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5 -echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5 +echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; } if test "${ac_cv_lib_c_inet_aton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15407,62 +15715,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_aton (); int main () { -inet_aton (); +return inet_aton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_c_inet_aton=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_inet_aton=no + ac_cv_lib_c_inet_aton=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5 -echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5 +echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; } if test $ac_cv_lib_c_inet_aton = yes; then $ac_cv_prog_TRUE else -echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 -echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5 +echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; } if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15475,56 +15780,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inet_aton (); int main () { -inet_aton (); +return inet_aton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_resolv_inet_aton=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_resolv_inet_aton=no + ac_cv_lib_resolv_inet_aton=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 -echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; } if test $ac_cv_lib_resolv_inet_aton = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 @@ -15547,8 +15849,8 @@ ;; esac -echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 -echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5 +echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; } if test "${ac_cv_lib_z_inflateCopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15561,56 +15863,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char inflateCopy (); int main () { -inflateCopy (); +return inflateCopy (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_z_inflateCopy=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_z_inflateCopy=no + ac_cv_lib_z_inflateCopy=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5 -echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5 +echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; } if test $ac_cv_lib_z_inflateCopy = yes; then cat >>confdefs.h <<\_ACEOF @@ -15627,8 +15926,8 @@ ;; esac -echo "$as_me:$LINENO: checking for hstrerror" >&5 -echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for hstrerror" >&5 +echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15648,47 +15947,44 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_HSTRERROR 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -echo "$as_me:$LINENO: checking for inet_aton" >&5 -echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inet_aton" >&5 +echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15711,47 +16007,44 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_INET_ATON 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -echo "$as_me:$LINENO: checking for inet_pton" >&5 -echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for inet_pton" >&5 +echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15774,47 +16067,43 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_INET_PTON 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # On some systems, setgroups is in unistd.h, on others, in grp.h -echo "$as_me:$LINENO: checking for setgroups" >&5 -echo $ECHO_N "checking for setgroups... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for setgroups" >&5 +echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15837,43 +16126,39 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_SETGROUPS 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check for openpty and forkpty @@ -15881,9 +16166,9 @@ for ac_func in openpty do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -15909,76 +16194,68 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 -echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; } if test "${ac_cv_lib_util_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -15991,64 +16268,61 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char openpty (); int main () { -openpty (); +return openpty (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_util_openpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_util_openpty=no + ac_cv_lib_util_openpty=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 -echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; } if test $ac_cv_lib_util_openpty = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENPTY 1 _ACEOF LIBS="$LIBS -lutil" else - echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5 -echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5 +echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16061,56 +16335,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char openpty (); int main () { -openpty (); +return openpty (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_openpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_openpty=no + ac_cv_lib_bsd_openpty=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; } if test $ac_cv_lib_bsd_openpty = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENPTY 1 @@ -16129,9 +16400,9 @@ for ac_func in forkpty do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16157,76 +16428,68 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 -echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 +echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; } if test "${ac_cv_lib_util_forkpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16239,64 +16502,61 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char forkpty (); int main () { -forkpty (); +return forkpty (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_util_forkpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_util_forkpty=no + ac_cv_lib_util_forkpty=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 -echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 +echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; } if test $ac_cv_lib_util_forkpty = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FORKPTY 1 _ACEOF LIBS="$LIBS -lutil" else - echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5 -echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5 +echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; } if test "${ac_cv_lib_bsd_forkpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -16309,56 +16569,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char forkpty (); int main () { -forkpty (); +return forkpty (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_forkpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_bsd_forkpty=no + ac_cv_lib_bsd_forkpty=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5 -echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; } if test $ac_cv_lib_bsd_forkpty = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FORKPTY 1 @@ -16384,9 +16641,9 @@ for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16412,68 +16669,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16491,9 +16740,9 @@ for ac_func in dup2 getcwd strdup strerror memmove do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16519,80 +16768,70 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi @@ -16603,9 +16842,9 @@ for ac_func in getpgrp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16631,68 +16870,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16713,27 +16944,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define GETPGRP_HAVE_ARG 1 @@ -16744,8 +16970,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done @@ -16754,9 +16982,9 @@ for ac_func in setpgrp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16782,68 +17010,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -16864,27 +17084,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define SETPGRP_HAVE_ARG 1 @@ -16895,8 +17110,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done @@ -16905,9 +17122,9 @@ for ac_func in gettimeofday do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -16933,68 +17150,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17015,27 +17224,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -17048,14 +17252,15 @@ fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done -echo "$as_me:$LINENO: checking for major" >&5 -echo $ECHO_N "checking for major... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for major" >&5 +echo $ECHO_N "checking for major... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17082,52 +17287,49 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_DEVICE_MACROS 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext # On OSF/1 V5.1, getaddrinfo is available, but a define # for [no]getaddrinfo in netdb.h. -echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17151,35 +17353,31 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 -echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5 +echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then - echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6 + { echo "$as_me:$LINENO: result: buggy" >&5 +echo "${ECHO_T}buggy" >&6; } buggygetaddrinfo=yes else cat >conftest.$ac_ext <<_ACEOF @@ -17277,18 +17475,27 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: good" >&5 -echo "${ECHO_T}good" >&6 + { echo "$as_me:$LINENO: result: good" >&5 +echo "${ECHO_T}good" >&6; } buggygetaddrinfo=no else echo "$as_me: program exited with status $ac_status" >&5 @@ -17296,23 +17503,26 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -echo "$as_me:$LINENO: result: buggy" >&5 -echo "${ECHO_T}buggy" >&6 +{ echo "$as_me:$LINENO: result: buggy" >&5 +echo "${ECHO_T}buggy" >&6; } buggygetaddrinfo=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } buggygetaddrinfo=yes fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$buggygetaddrinfo" = "yes"; then @@ -17332,9 +17542,9 @@ for ac_func in getnameinfo do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -17360,68 +17570,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -17432,8 +17634,8 @@ # checks for structures -echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17457,38 +17659,34 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF @@ -17497,8 +17695,8 @@ fi -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17514,44 +17712,42 @@ int main () { -struct tm *tp; tp->tm_sec; +struct tm tm; + int *p = &tm.tm_sec; + return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_tm=sys/time.h + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @@ -17560,8 +17756,8 @@ fi -echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17586,33 +17782,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17633,40 +17824,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -17683,8 +17871,77 @@ _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17695,52 +17952,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -atoi(*tzname); +return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_var_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -17750,8 +18004,8 @@ fi fi -echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 +echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17773,33 +18027,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_rdev=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17817,40 +18066,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_rdev=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_rdev=no + ac_cv_member_struct_stat_st_rdev=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; } if test $ac_cv_member_struct_stat_st_rdev = yes; then cat >>confdefs.h <<_ACEOF @@ -17860,8 +18106,8 @@ fi -echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17883,33 +18129,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -17927,40 +18168,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blksize=no + ac_cv_member_struct_stat_st_blksize=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @@ -17970,8 +18208,8 @@ fi -echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 -echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 +echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -17993,33 +18231,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_flags=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18037,40 +18270,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_flags=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_flags=no + ac_cv_member_struct_stat_st_flags=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; } if test $ac_cv_member_struct_stat_st_flags = yes; then cat >>confdefs.h <<_ACEOF @@ -18080,8 +18310,8 @@ fi -echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 -echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 +echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18103,33 +18333,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_gen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18147,40 +18372,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_gen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_gen=no + ac_cv_member_struct_stat_st_gen=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; } if test $ac_cv_member_struct_stat_st_gen = yes; then cat >>confdefs.h <<_ACEOF @@ -18190,8 +18412,8 @@ fi -echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 -echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5 +echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18213,33 +18435,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_birthtime=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18257,40 +18474,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_birthtime=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_birthtime=no + ac_cv_member_struct_stat_st_birthtime=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; } if test $ac_cv_member_struct_stat_st_birthtime = yes; then cat >>confdefs.h <<_ACEOF @@ -18300,8 +18514,8 @@ fi -echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18323,33 +18537,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -18367,40 +18576,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_stat_st_blocks=no + ac_cv_member_struct_stat_st_blocks=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; } if test $ac_cv_member_struct_stat_st_blocks = yes; then cat >>confdefs.h <<_ACEOF @@ -18413,20 +18619,18 @@ _ACEOF else - case $LIBOBJS in - "fileblocks.$ac_objext" | \ - *" fileblocks.$ac_objext" | \ - "fileblocks.$ac_objext "* | \ + case " $LIBOBJS " in *" fileblocks.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" + ;; esac fi -echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5 -echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5 +echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; } if test "${ac_cv_header_time_altzone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18446,39 +18650,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_time_altzone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_time_altzone=no + ac_cv_header_time_altzone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5 -echo "${ECHO_T}$ac_cv_header_time_altzone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5 +echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; } if test $ac_cv_header_time_altzone = yes; then cat >>confdefs.h <<\_ACEOF @@ -18488,8 +18688,8 @@ fi was_it_defined=no -echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18510,27 +18710,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF @@ -18543,13 +18738,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $was_it_defined" >&5 -echo "${ECHO_T}$was_it_defined" >&6 -echo "$as_me:$LINENO: checking for addrinfo" >&5 -echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $was_it_defined" >&5 +echo "${ECHO_T}$was_it_defined" >&6; } + +{ echo "$as_me:$LINENO: checking for addrinfo" >&5 +echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; } if test "${ac_cv_struct_addrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18570,39 +18767,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_addrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_addrinfo=no + ac_cv_struct_addrinfo=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5 -echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5 +echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; } if test $ac_cv_struct_addrinfo = yes; then cat >>confdefs.h <<\_ACEOF @@ -18611,8 +18804,8 @@ fi -echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 -echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5 +echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; } if test "${ac_cv_struct_sockaddr_storage+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18634,39 +18827,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_struct_sockaddr_storage=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_struct_sockaddr_storage=no + ac_cv_struct_sockaddr_storage=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 -echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 +echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; } if test $ac_cv_struct_sockaddr_storage = yes; then cat >>confdefs.h <<\_ACEOF @@ -18678,8 +18867,8 @@ # checks for compiler characteristics -echo "$as_me:$LINENO: checking whether char is unsigned" >&5 -echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18701,38 +18890,34 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_char_unsigned=yes + ac_cv_c_char_unsigned=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 -echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 @@ -18740,8 +18925,8 @@ fi -echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -18759,10 +18944,10 @@ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; - const charset x; + const charset cs; /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; + char const *const *pcpcc; + char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; @@ -18771,16 +18956,17 @@ an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; - ccp = &g + (g ? g-g : 0); + pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; + if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; @@ -18799,7 +18985,9 @@ } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; + if (!foo) return 0; } + return !cs[0] && !zero.x; #endif ; @@ -18807,38 +18995,34 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_const=no + ac_cv_c_const=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @@ -18849,8 +19033,8 @@ works=no -echo "$as_me:$LINENO: checking for working volatile" >&5 -echo $ECHO_N "checking for working volatile... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working volatile" >&5 +echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18867,27 +19051,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then works=yes else echo "$as_me: failed program was:" >&5 @@ -18900,13 +19079,14 @@ fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } works=no -echo "$as_me:$LINENO: checking for working signed char" >&5 -echo $ECHO_N "checking for working signed char... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working signed char" >&5 +echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18923,27 +19103,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then works=yes else echo "$as_me: failed program was:" >&5 @@ -18956,13 +19131,14 @@ fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } have_prototypes=no -echo "$as_me:$LINENO: checking for prototypes" >&5 -echo $ECHO_N "checking for prototypes... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for prototypes" >&5 +echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18979,27 +19155,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF @@ -19012,14 +19183,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $have_prototypes" >&5 -echo "${ECHO_T}$have_prototypes" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_prototypes" >&5 +echo "${ECHO_T}$have_prototypes" >&6; } works=no -echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 -echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5 +echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19046,27 +19219,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF @@ -19079,14 +19247,16 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $works" >&5 -echo "${ECHO_T}$works" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $works" >&5 +echo "${ECHO_T}$works" >&6; } # check for socketpair -echo "$as_me:$LINENO: checking for socketpair" >&5 -echo $ECHO_N "checking for socketpair... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for socketpair" >&5 +echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19106,47 +19276,43 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKETPAIR 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check if sockaddr has sa_len member -echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5 -echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5 +echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19165,29 +19331,24 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 @@ -19197,14 +19358,15 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext va_list_is_array=no -echo "$as_me:$LINENO: checking whether va_list is an array" >&5 -echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5 +echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19227,27 +19389,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -19262,16 +19419,17 @@ va_list_is_array=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $va_list_is_array" >&5 -echo "${ECHO_T}$va_list_is_array" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5 +echo "${ECHO_T}$va_list_is_array" >&6; } # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( -echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 -echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 +echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; } if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -19298,76 +19456,67 @@ #undef gethostbyname_r -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname_r (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) +#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r choke me -#else -char (*f) () = gethostbyname_r; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != gethostbyname_r; +return gethostbyname_r (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_gethostbyname_r=no + ac_cv_func_gethostbyname_r=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 -echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; } if test $ac_cv_func_gethostbyname_r = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYNAME_R 1 _ACEOF - echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5 -echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5 +echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; } OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" cat >conftest.$ac_ext <<_ACEOF @@ -19396,27 +19545,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYNAME_R 1 @@ -19427,18 +19571,18 @@ #define HAVE_GETHOSTBYNAME_R_6_ARG 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5 -echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5 +echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19465,27 +19609,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYNAME_R 1 @@ -19496,18 +19635,18 @@ #define HAVE_GETHOSTBYNAME_R_5_ARG 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5 -echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5 +echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19532,27 +19671,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYNAME_R 1 @@ -19563,25 +19697,28 @@ #define HAVE_GETHOSTBYNAME_R_3_ARG 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$OLD_CFLAGS else @@ -19590,9 +19727,9 @@ for ac_func in gethostbyname do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -19618,68 +19755,60 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -19701,8 +19830,8 @@ # (none yet) # Linux requires this for correct f.p. operations -echo "$as_me:$LINENO: checking for __fpu_control" >&5 -echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for __fpu_control" >&5 +echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; } if test "${ac_cv_func___fpu_control+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -19729,74 +19858,65 @@ #undef __fpu_control -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __fpu_control (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub___fpu_control) || defined (__stub_____fpu_control) +#if defined __stub___fpu_control || defined __stub_____fpu_control choke me -#else -char (*f) () = __fpu_control; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != __fpu_control; +return __fpu_control (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func___fpu_control=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func___fpu_control=no + ac_cv_func___fpu_control=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5 -echo "${ECHO_T}$ac_cv_func___fpu_control" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5 +echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; } if test $ac_cv_func___fpu_control = yes; then : else -echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5 -echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5 +echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; } if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -19809,56 +19929,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char __fpu_control (); int main () { -__fpu_control (); +return __fpu_control (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_ieee___fpu_control=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_ieee___fpu_control=no + ac_cv_lib_ieee___fpu_control=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5 -echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5 +echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; } if test $ac_cv_lib_ieee___fpu_control = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBIEEE 1 @@ -19873,13 +19990,12 @@ # Check for --with-fpectl -echo "$as_me:$LINENO: checking for --with-fpectl" >&5 -echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5 +echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; } -# Check whether --with-fpectl or --without-fpectl was given. +# Check whether --with-fpectl was given. if test "${with_fpectl+set}" = set; then - withval="$with_fpectl" - + withval=$with_fpectl; if test "$withval" != no then @@ -19887,15 +20003,16 @@ #define WANT_SIGFPE_HANDLER 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi; + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + # check for --with-libm=... @@ -19904,55 +20021,55 @@ BeOS) ;; *) LIBM=-lm esac -echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 -echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5 +echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; } -# Check whether --with-libm or --without-libm was given. +# Check whether --with-libm was given. if test "${with_libm+set}" = set; then - withval="$with_libm" - + withval=$with_libm; if test "$withval" = no then LIBM= - echo "$as_me:$LINENO: result: force LIBM empty" >&5 -echo "${ECHO_T}force LIBM empty" >&6 + { echo "$as_me:$LINENO: result: force LIBM empty" >&5 +echo "${ECHO_T}force LIBM empty" >&6; } elif test "$withval" != yes then LIBM=$withval - echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5 -echo "${ECHO_T}set LIBM=\"$withval\"" >&6 + { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5 +echo "${ECHO_T}set LIBM=\"$withval\"" >&6; } else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5 echo "$as_me: error: proper usage is --with-libm=STRING" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 -echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6 -fi; + { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5 +echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; } +fi + # check for --with-libc=... -echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5 -echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5 +echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; } -# Check whether --with-libc or --without-libc was given. +# Check whether --with-libc was given. if test "${with_libc+set}" = set; then - withval="$with_libc" - + withval=$with_libc; if test "$withval" = no then LIBC= - echo "$as_me:$LINENO: result: force LIBC empty" >&5 -echo "${ECHO_T}force LIBC empty" >&6 + { echo "$as_me:$LINENO: result: force LIBC empty" >&5 +echo "${ECHO_T}force LIBC empty" >&6; } elif test "$withval" != yes then LIBC=$withval - echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5 -echo "${ECHO_T}set LIBC=\"$withval\"" >&6 + { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5 +echo "${ECHO_T}set LIBC=\"$withval\"" >&6; } else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5 echo "$as_me: error: proper usage is --with-libc=STRING" >&2;} { (exit 1); exit 1; }; } fi else - echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 -echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6 -fi; + { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5 +echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; } +fi + # check for hypot() in math library LIBS_SAVE=$LIBS @@ -19961,9 +20078,9 @@ for ac_func in hypot do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -19989,80 +20106,70 @@ #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ + case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + ;; esac fi @@ -20073,17 +20180,17 @@ # check for wchar.h if test "${ac_cv_header_wchar_h+set}" = set; then - echo "$as_me:$LINENO: checking for wchar.h" >&5 -echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for wchar.h" >&5 +echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; } if test "${ac_cv_header_wchar_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 +echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking wchar.h usability" >&5 -echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking wchar.h usability" >&5 +echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20094,41 +20201,37 @@ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking wchar.h presence" >&5 -echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking wchar.h presence" >&5 +echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20137,24 +20240,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -20162,9 +20263,10 @@ ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -20188,25 +20290,23 @@ echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + ( cat <<\_ASBOX ## ------------------------------------------------ ## ## Report this to http://www.python.org/python-bugs ## ## ------------------------------------------------ ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac -echo "$as_me:$LINENO: checking for wchar.h" >&5 -echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for wchar.h" >&5 +echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; } if test "${ac_cv_header_wchar_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_wchar_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 -echo "${ECHO_T}$ac_cv_header_wchar_h" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5 +echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; } fi if test $ac_cv_header_wchar_h = yes; then @@ -20228,8 +20328,8 @@ # determine wchar_t size if test "$wchar_h" = yes then - echo "$as_me:$LINENO: checking for wchar_t" >&5 -echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for wchar_t" >&5 +echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; } if test "${ac_cv_type_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -20241,61 +20341,57 @@ /* end confdefs.h. */ #include +typedef wchar_t ac__type_new_; int main () { -if ((wchar_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (wchar_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_wchar_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_wchar_t=no + ac_cv_type_wchar_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5 -echo "${ECHO_T}$ac_cv_type_wchar_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5 +echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; } -echo "$as_me:$LINENO: checking size of wchar_t" >&5 -echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6 +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of wchar_t" >&5 +echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_wchar_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_wchar_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -20306,10 +20402,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; @@ -20317,27 +20414,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -20348,10 +20440,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -20359,46 +20452,42 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20406,10 +20495,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; @@ -20417,27 +20507,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -20448,10 +20533,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; @@ -20459,50 +20545,48 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= + ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` @@ -20514,10 +20598,11 @@ /* end confdefs.h. */ #include + typedef wchar_t ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; @@ -20525,52 +20610,45 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_wchar_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77 +'') if test "$ac_cv_type_wchar_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (wchar_t), 77 +echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_wchar_t=0 + fi ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20579,8 +20657,9 @@ /* end confdefs.h. */ #include -long longval () { return (long) (sizeof (wchar_t)); } -unsigned long ulongval () { return (long) (sizeof (wchar_t)); } + typedef wchar_t ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int @@ -20589,35 +20668,44 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) - exit (1); - if (((long) (sizeof (wchar_t))) < 0) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) { - long i = longval (); - if (i != ((long) (sizeof (wchar_t)))) - exit (1); + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%ld\n", i); } else { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (wchar_t)))) - exit (1); + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; fprintf (f, "%lu\n", i); } - exit (ferror (f) || fclose (f) != 0); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -20628,22 +20716,25 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77 +if test "$ac_cv_type_wchar_t" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (wchar_t), 77 +echo "$as_me: error: cannot compute sizeof (wchar_t) See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_wchar_t=0 + fi fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val -else - ac_cv_sizeof_wchar_t=0 -fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t _ACEOF @@ -20651,8 +20742,8 @@ fi -echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 -echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5 +echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; } have_ucs4_tcl=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20674,27 +20765,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF @@ -20707,17 +20793,19 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 -echo "${ECHO_T}$have_ucs4_tcl" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5 +echo "${ECHO_T}$have_ucs4_tcl" >&6; } # check whether wchar_t is signed or not if test "$wchar_h" = yes then # check whether wchar_t is signed or not - echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5 -echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5 +echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; } if test "${ac_cv_wchar_t_signed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -20741,13 +20829,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -20760,23 +20857,25 @@ ( exit $ac_status ) ac_cv_wchar_t_signed=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi - echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5 -echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6 + { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5 +echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; } fi -echo "$as_me:$LINENO: checking what type to use for unicode" >&5 -echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6 -# Check whether --enable-unicode or --disable-unicode was given. +{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5 +echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; } +# Check whether --enable-unicode was given. if test "${enable_unicode+set}" = set; then - enableval="$enable_unicode" - + enableval=$enable_unicode; else enable_unicode=yes -fi; +fi + if test $enable_unicode = yes then @@ -20813,8 +20912,8 @@ if test "$enable_unicode" = "no" then UNICODE_OBJS="" - echo "$as_me:$LINENO: result: not used" >&5 -echo "${ECHO_T}not used" >&6 + { echo "$as_me:$LINENO: result: not used" >&5 +echo "${ECHO_T}not used" >&6; } else UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" @@ -20854,13 +20953,13 @@ else PY_UNICODE_TYPE="no type found" fi - echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 -echo "${ECHO_T}$PY_UNICODE_TYPE" >&6 + { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5 +echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; } fi # check for endianness -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -20877,7 +20976,8 @@ int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif @@ -20886,27 +20986,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -20929,40 +21024,36 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. + # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown @@ -20972,11 +21063,11 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () @@ -20987,27 +21078,22 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi @@ -21023,8 +21109,10 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21032,27 +21120,41 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$ac_includes_default int main () { + /* Are we little or big endian? From Harbison&Steele. */ union { - long l; - char c[sizeof (long)]; + long int l; + char c[sizeof (long int)]; } u; u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -21065,13 +21167,16 @@ ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) @@ -21094,8 +21199,8 @@ # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). -echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 -echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5 +echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; } if test "${ac_cv_rshift_extends_sign+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21117,13 +21222,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -21136,12 +21250,14 @@ ( exit $ac_status ) ac_cv_rshift_extends_sign=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5 -echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5 +echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; } if test "$ac_cv_rshift_extends_sign" = no then @@ -21152,8 +21268,8 @@ fi # check for getc_unlocked and related locking functions -echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5 -echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5 +echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; } if test "${ac_cv_have_getc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21179,40 +21295,37 @@ } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_have_getc_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_getc_unlocked=no + ac_cv_have_getc_unlocked=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; } if test "$ac_cv_have_getc_unlocked" = yes then @@ -21226,8 +21339,8 @@ # save the value of LIBS so we don't actually link Python with readline LIBS_no_readline=$LIBS -echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 -echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 +echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_readline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21240,56 +21353,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char readline (); int main () { -readline (); +return readline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_readline=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_readline_readline=no + ac_cv_lib_readline_readline=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; } if test $ac_cv_lib_readline_readline = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBREADLINE 1 @@ -21302,8 +21412,8 @@ if test "$ac_cv_have_readline_readline" = no then -echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5 -echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5 +echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; } if test "${ac_cv_lib_termcap_readline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21316,56 +21426,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char readline (); int main () { -readline (); +return readline (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_termcap_readline=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_termcap_readline=no + ac_cv_lib_termcap_readline=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5 -echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5 +echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; } if test $ac_cv_lib_termcap_readline = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBTERMCAP 1 @@ -21378,8 +21485,8 @@ fi # check for readline 2.1 -echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 -echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5 +echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21392,56 +21499,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char rl_callback_handler_install (); int main () { -rl_callback_handler_install (); +return rl_callback_handler_install (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_callback_handler_install=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_readline_rl_callback_handler_install=no + ac_cv_lib_readline_rl_callback_handler_install=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; } if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then cat >>confdefs.h <<\_ACEOF @@ -21460,24 +21564,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then have_readline=yes else echo "$as_me: failed program was:" >&5 @@ -21485,6 +21587,7 @@ have_readline=no fi + rm -f conftest.err conftest.$ac_ext if test $have_readline = yes then @@ -21510,8 +21613,8 @@ fi # check for readline 4.0 -echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5 -echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5 +echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21524,56 +21627,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char rl_pre_input_hook (); int main () { -rl_pre_input_hook (); +return rl_pre_input_hook (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_pre_input_hook=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_readline_rl_pre_input_hook=no + ac_cv_lib_readline_rl_pre_input_hook=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; } if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then cat >>confdefs.h <<\_ACEOF @@ -21584,8 +21684,8 @@ # check for readline 4.2 -echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 -echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5 +echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21598,56 +21698,53 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char rl_completion_matches (); int main () { -rl_completion_matches (); +return rl_completion_matches (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_readline_rl_completion_matches=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_readline_rl_completion_matches=no + ac_cv_lib_readline_rl_completion_matches=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; } if test $ac_cv_lib_readline_rl_completion_matches = yes; then cat >>confdefs.h <<\_ACEOF @@ -21666,24 +21763,22 @@ /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then have_readline=yes else echo "$as_me: failed program was:" >&5 @@ -21691,6 +21786,7 @@ have_readline=no fi + rm -f conftest.err conftest.$ac_ext if test $have_readline = yes then @@ -21718,8 +21814,8 @@ # End of readline checks: restore LIBS LIBS=$LIBS_no_readline -echo "$as_me:$LINENO: checking for broken nice()" >&5 -echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for broken nice()" >&5 +echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; } if test "${ac_cv_broken_nice+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21744,13 +21840,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -21763,12 +21868,14 @@ ( exit $ac_status ) ac_cv_broken_nice=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5 -echo "${ECHO_T}$ac_cv_broken_nice" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5 +echo "${ECHO_T}$ac_cv_broken_nice" >&6; } if test "$ac_cv_broken_nice" = yes then @@ -21778,8 +21885,8 @@ fi -echo "$as_me:$LINENO: checking for broken poll()" >&5 -echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for broken poll()" >&5 +echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then ac_cv_broken_poll=no else @@ -21816,13 +21923,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -21835,10 +21951,12 @@ ( exit $ac_status ) ac_cv_broken_poll=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 -echo "${ECHO_T}$ac_cv_broken_poll" >&6 + + +{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5 +echo "${ECHO_T}$ac_cv_broken_poll" >&6; } if test "$ac_cv_broken_poll" = yes then @@ -21851,8 +21969,8 @@ # Before we can test tzset, we need to check if struct tm has a tm_zone # (which is not required by ISO C or UNIX spec) and/or if we support # tzname[] -echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 -echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21877,33 +21995,28 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -21924,40 +22037,37 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_tm_tm_zone=no + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF @@ -21974,8 +22084,77 @@ _ACEOF else - echo "$as_me:$LINENO: checking for tzname" >&5 -echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -21986,52 +22165,49 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#if !HAVE_DECL_TZNAME +extern char *tzname[]; #endif int main () { -atoi(*tzname); +return tzname[0][0]; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_var_tzname=no + ac_cv_var_tzname=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF @@ -22043,8 +22219,8 @@ # check tzset(3) exists and works like we expect it to -echo "$as_me:$LINENO: checking for working tzset()" >&5 -echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for working tzset()" >&5 +echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; } if test "${ac_cv_working_tzset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -22124,13 +22300,22 @@ _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -22143,12 +22328,14 @@ ( exit $ac_status ) ac_cv_working_tzset=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5 -echo "${ECHO_T}$ac_cv_working_tzset" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5 +echo "${ECHO_T}$ac_cv_working_tzset" >&6; } if test "$ac_cv_working_tzset" = yes then @@ -22159,8 +22346,8 @@ fi # Look for subsecond timestamps in struct stat -echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5 -echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5 +echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; } if test "${ac_cv_stat_tv_nsec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -22183,39 +22370,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_stat_tv_nsec=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_stat_tv_nsec=no + ac_cv_stat_tv_nsec=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5 -echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5 +echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; } if test "$ac_cv_stat_tv_nsec" = yes then @@ -22226,8 +22409,8 @@ fi # Look for BSD style subsecond timestamps in struct stat -echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5 -echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5 +echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; } if test "${ac_cv_stat_tv_nsec2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -22250,39 +22433,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_stat_tv_nsec2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_stat_tv_nsec2=no + ac_cv_stat_tv_nsec2=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5 -echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5 +echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; } if test "$ac_cv_stat_tv_nsec2" = yes then @@ -22293,8 +22472,8 @@ fi # On HP/UX 11.0, mvwdelch is a block with a return statement -echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5 -echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5 +echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; } if test "${ac_cv_mvwdelch_is_expression+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -22317,39 +22496,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_mvwdelch_is_expression=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_mvwdelch_is_expression=no + ac_cv_mvwdelch_is_expression=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5 -echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5 +echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; } if test "$ac_cv_mvwdelch_is_expression" = yes then @@ -22360,8 +22535,8 @@ fi -echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 -echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5 +echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; } if test "${ac_cv_window_has_flags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -22384,39 +22559,35 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_window_has_flags=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_window_has_flags=no + ac_cv_window_has_flags=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5 -echo "${ECHO_T}$ac_cv_window_has_flags" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5 +echo "${ECHO_T}$ac_cv_window_has_flags" >&6; } if test "$ac_cv_window_has_flags" = yes @@ -22428,8 +22599,8 @@ fi -echo "$as_me:$LINENO: checking for is_term_resized" >&5 -echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for is_term_resized" >&5 +echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22446,46 +22617,42 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_IS_TERM_RESIZED 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for resize_term" >&5 -echo $ECHO_N "checking for resize_term... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking for resize_term" >&5 +echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22502,46 +22669,42 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_RESIZE_TERM 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for resizeterm" >&5 -echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking for resizeterm" >&5 +echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22558,80 +22721,76 @@ } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_RESIZETERM 1 _ACEOF - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 -echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5 +echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; } if test -r /dev/ptmx then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_PTMX 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo "$as_me:$LINENO: checking for /dev/ptc" >&5 -echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5 +echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; } if test -r /dev/ptc then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_PTC 1 _ACEOF else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 -echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5 +echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 @@ -22677,18 +22836,27 @@ } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define PY_FORMAT_SIZE_T "z" @@ -22700,14 +22868,16 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +{ echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 + + +{ echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -22726,50 +22896,47 @@ #endif +typedef socklen_t ac__type_new_; int main () { -if ((socklen_t *) 0) +if ((ac__type_new_ *) 0) return 0; -if (sizeof (socklen_t)) +if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_socklen_t=no + ac_cv_type_socklen_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; } if test $ac_cv_type_socklen_t = yes; then : else @@ -22790,18 +22957,18 @@ SRCDIRS="Parser Grammar Objects Python Modules Mac" -echo "$as_me:$LINENO: checking for build directories" >&5 -echo $ECHO_N "checking for build directories... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for build directories" >&5 +echo $ECHO_N "checking for build directories... $ECHO_C" >&6; } for dir in $SRCDIRS; do if test ! -d $dir; then mkdir $dir fi done -echo "$as_me:$LINENO: result: done" >&5 -echo "${ECHO_T}done" >&6 +{ echo "$as_me:$LINENO: result: done" >&5 +echo "${ECHO_T}done" >&6; } # generate output files - ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config" +ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -22821,39 +22988,58 @@ # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -22862,32 +23048,18 @@ # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -22918,17 +23090,45 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -22938,8 +23138,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -22953,18 +23188,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -22972,159 +23208,120 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -23133,7 +23330,28 @@ as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -23142,31 +23360,14 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by python $as_me 2.6, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -23174,30 +23375,19 @@ CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_headers="$ac_config_headers" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -23205,7 +23395,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -23221,19 +23411,21 @@ $config_headers Report bugs to ." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ python config.status 2.6 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -23244,39 +23436,24 @@ do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift @@ -23286,18 +23463,24 @@ $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -23313,33 +23496,47 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 - - - +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Mac/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;; - "Mac/PythonLauncher/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;; - "Mac/IDLE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;; - "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; - "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; - "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;; + case $ac_config_target in + "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;; + "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;; + "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;; + "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;; + "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; + "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -23350,363 +23547,471 @@ fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s, at SHELL@,$SHELL,;t t -s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t -s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t -s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s, at exec_prefix@,$exec_prefix,;t t -s, at prefix@,$prefix,;t t -s, at program_transform_name@,$program_transform_name,;t t -s, at bindir@,$bindir,;t t -s, at sbindir@,$sbindir,;t t -s, at libexecdir@,$libexecdir,;t t -s, at datadir@,$datadir,;t t -s, at sysconfdir@,$sysconfdir,;t t -s, at sharedstatedir@,$sharedstatedir,;t t -s, at localstatedir@,$localstatedir,;t t -s, at libdir@,$libdir,;t t -s, at includedir@,$includedir,;t t -s, at oldincludedir@,$oldincludedir,;t t -s, at infodir@,$infodir,;t t -s, at mandir@,$mandir,;t t -s, at build_alias@,$build_alias,;t t -s, at host_alias@,$host_alias,;t t -s, at target_alias@,$target_alias,;t t -s, at DEFS@,$DEFS,;t t -s, at ECHO_C@,$ECHO_C,;t t -s, at ECHO_N@,$ECHO_N,;t t -s, at ECHO_T@,$ECHO_T,;t t -s, at LIBS@,$LIBS,;t t -s, at VERSION@,$VERSION,;t t -s, at SOVERSION@,$SOVERSION,;t t -s, at CONFIG_ARGS@,$CONFIG_ARGS,;t t -s, at UNIVERSALSDK@,$UNIVERSALSDK,;t t -s, at PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t -s, at PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t -s, at PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t -s, at PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t -s, at FRAMEWORKINSTALLFIRST@,$FRAMEWORKINSTALLFIRST,;t t -s, at FRAMEWORKINSTALLLAST@,$FRAMEWORKINSTALLLAST,;t t -s, at FRAMEWORKALTINSTALLFIRST@,$FRAMEWORKALTINSTALLFIRST,;t t -s, at FRAMEWORKALTINSTALLLAST@,$FRAMEWORKALTINSTALLLAST,;t t -s, at FRAMEWORKUNIXTOOLSPREFIX@,$FRAMEWORKUNIXTOOLSPREFIX,;t t -s, at MACHDEP@,$MACHDEP,;t t -s, at SGI_ABI@,$SGI_ABI,;t t -s, at EXTRAPLATDIR@,$EXTRAPLATDIR,;t t -s, at EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t -s, at CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t -s, at EXPORT_MACOSX_DEPLOYMENT_TARGET@,$EXPORT_MACOSX_DEPLOYMENT_TARGET,;t t -s, at CC@,$CC,;t t -s, at CFLAGS@,$CFLAGS,;t t -s, at LDFLAGS@,$LDFLAGS,;t t -s, at CPPFLAGS@,$CPPFLAGS,;t t -s, at ac_ct_CC@,$ac_ct_CC,;t t -s, at EXEEXT@,$EXEEXT,;t t -s, at OBJEXT@,$OBJEXT,;t t -s, at CXX@,$CXX,;t t -s, at MAINCC@,$MAINCC,;t t -s, at CPP@,$CPP,;t t -s, at EGREP@,$EGREP,;t t -s, at BUILDEXEEXT@,$BUILDEXEEXT,;t t -s, at LIBRARY@,$LIBRARY,;t t -s, at LDLIBRARY@,$LDLIBRARY,;t t -s, at DLLLIBRARY@,$DLLLIBRARY,;t t -s, at BLDLIBRARY@,$BLDLIBRARY,;t t -s, at LDLIBRARYDIR@,$LDLIBRARYDIR,;t t -s, at INSTSONAME@,$INSTSONAME,;t t -s, at RUNSHARED@,$RUNSHARED,;t t -s, at LINKCC@,$LINKCC,;t t -s, at RANLIB@,$RANLIB,;t t -s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s, at AR@,$AR,;t t -s, at SVNVERSION@,$SVNVERSION,;t t -s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s, at INSTALL_DATA@,$INSTALL_DATA,;t t -s, at LN@,$LN,;t t -s, at OPT@,$OPT,;t t -s, at BASECFLAGS@,$BASECFLAGS,;t t -s, at OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t -s, at LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t -s, at SO@,$SO,;t t -s, at LDSHARED@,$LDSHARED,;t t -s, at BLDSHARED@,$BLDSHARED,;t t -s, at CCSHARED@,$CCSHARED,;t t -s, at LINKFORSHARED@,$LINKFORSHARED,;t t -s, at CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t -s, at SHLIBS@,$SHLIBS,;t t -s, at USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t -s, at SIGNAL_OBJS@,$SIGNAL_OBJS,;t t -s, at USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t -s, at LDLAST@,$LDLAST,;t t -s, at THREADOBJ@,$THREADOBJ,;t t -s, at DLINCLDIR@,$DLINCLDIR,;t t -s, at DYNLOADFILE@,$DYNLOADFILE,;t t -s, at MACHDEP_OBJS@,$MACHDEP_OBJS,;t t -s, at TRUE@,$TRUE,;t t -s, at LIBOBJS@,$LIBOBJS,;t t -s, at HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t -s, at HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t -s, at HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t -s, at HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t -s, at HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t -s, at LIBM@,$LIBM,;t t -s, at LIBC@,$LIBC,;t t -s, at UNICODE_OBJS@,$UNICODE_OBJS,;t t -s, at THREADHEADERS@,$THREADHEADERS,;t t -s, at SRCDIRS@,$SRCDIRS,;t t -s, at LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +VERSION!$VERSION$ac_delim +SOVERSION!$SOVERSION$ac_delim +CONFIG_ARGS!$CONFIG_ARGS$ac_delim +UNIVERSALSDK!$UNIVERSALSDK$ac_delim +PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim +PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim +PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim +PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim +FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim +FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim +FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim +FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim +FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim +MACHDEP!$MACHDEP$ac_delim +SGI_ABI!$SGI_ABI$ac_delim +EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim +EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim +CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim +EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +CXX!$CXX$ac_delim +MAINCC!$MAINCC$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +BUILDEXEEXT!$BUILDEXEEXT$ac_delim +LIBRARY!$LIBRARY$ac_delim +LDLIBRARY!$LDLIBRARY$ac_delim +DLLLIBRARY!$DLLLIBRARY$ac_delim +BLDLIBRARY!$BLDLIBRARY$ac_delim +LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim +INSTSONAME!$INSTSONAME$ac_delim +RUNSHARED!$RUNSHARED$ac_delim +LINKCC!$LINKCC$ac_delim +RANLIB!$RANLIB$ac_delim +AR!$AR$ac_delim +SVNVERSION!$SVNVERSION$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +LN!$LN$ac_delim +OPT!$OPT$ac_delim +BASECFLAGS!$BASECFLAGS$ac_delim +OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim +LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim +SO!$SO$ac_delim +LDSHARED!$LDSHARED$ac_delim +BLDSHARED!$BLDSHARED$ac_delim +CCSHARED!$CCSHARED$ac_delim +LINKFORSHARED!$LINKFORSHARED$ac_delim +CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim +SHLIBS!$SHLIBS$ac_delim +USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim +SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim +LDLAST!$LDLAST$ac_delim +THREADOBJ!$THREADOBJ$ac_delim +DLINCLDIR!$DLINCLDIR$ac_delim +DYNLOADFILE!$DYNLOADFILE$ac_delim +MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim +TRUE!$TRUE$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim +HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim +HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim +HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim +HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim +LIBM!$LIBM$ac_delim +LIBC!$LIBC$ac_delim +UNICODE_OBJS!$UNICODE_OBJS$ac_delim +THREADHEADERS!$THREADHEADERS$ac_delim +SRCDIRS!$SRCDIRS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub @@ -23714,252 +24019,137 @@ cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s, at configure_input@,$configure_input,;t t -s, at srcdir@,$ac_srcdir,;t t -s, at abs_srcdir@,$ac_abs_srcdir,;t t -s, at top_srcdir@,$ac_top_srcdir,;t t -s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s, at builddir@,$ac_builddir,;t t -s, at abs_builddir@,$ac_abs_builddir,;t t -s, at top_builddir@,$ac_top_builddir,;t t -s, at abs_top_builddir@,$ac_abs_top_builddir,;t t -s, at INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines -# This sed command replaces #undef with comments. This is necessary, for +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null +while : do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs +rm -f conftest.defines conftest.tail +echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - rm -f $ac_file - mv $tmp/config.h $ac_file + mv "$tmp/config.h" $ac_file fi else - cat $tmp/config.h - rm -f $tmp/config.h + echo "/* $configure_input */" + cat "$ac_result" fi -done -_ACEOF + rm -f "$tmp/out12" + ;; + + + esac + +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF Modified: python/trunk/configure.in ============================================================================== --- python/trunk/configure.in (original) +++ python/trunk/configure.in Sat Jun 2 05:02:29 2007 @@ -450,7 +450,7 @@ # Check for unsupported systems case $ac_sys_system/$ac_sys_release in -Linux*/1*) +atheos*|Linux*/1*) echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. echo See README for details. exit 1;; From python-checkins at python.org Sat Jun 2 05:05:04 2007 From: python-checkins at python.org (brett.cannon) Date: Sat, 2 Jun 2007 05:05:04 +0200 (CEST) Subject: [Python-checkins] r55740 - peps/trunk/pep-0011.txt peps/trunk/pep-0361.txt Message-ID: <20070602030504.8DB361E4003@bag.python.org> Author: brett.cannon Date: Sat Jun 2 05:04:57 2007 New Revision: 55740 Modified: peps/trunk/pep-0011.txt peps/trunk/pep-0361.txt Log: Note that AtheOS support stops in Python 2.6. Modified: peps/trunk/pep-0011.txt ============================================================================== --- peps/trunk/pep-0011.txt (original) +++ peps/trunk/pep-0011.txt Sat Jun 2 05:04:57 2007 @@ -133,6 +133,10 @@ Unsupported in: Python 2.6 (warning in 2.5 installer) Code removed in: Python 2.6 + Name: AtheOS + Unsupported in: Python 2.6 + Code removed in: Python 2.7 (tentative) + Copyright This document has been placed in the public domain. Modified: peps/trunk/pep-0361.txt ============================================================================== --- peps/trunk/pep-0361.txt (original) +++ peps/trunk/pep-0361.txt Sat Jun 2 05:04:57 2007 @@ -90,6 +90,7 @@ - with/as will be keywords - a __dir__() special method to control dir() was added [1] + - AtheOS support stopped. Possible features for 2.6 From python-checkins at python.org Sat Jun 2 09:56:59 2007 From: python-checkins at python.org (neal.norwitz) Date: Sat, 2 Jun 2007 09:56:59 +0200 (CEST) Subject: [Python-checkins] r55743 - peps/trunk/pep-3100.txt Message-ID: <20070602075659.343CB1E4003@bag.python.org> Author: neal.norwitz Date: Sat Jun 2 09:56:55 2007 New Revision: 55743 Modified: peps/trunk/pep-3100.txt Log: Update modules that have been removed so far Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Sat Jun 2 09:56:55 2007 @@ -212,19 +212,19 @@ + see PEP 4 [#pep4]_ - ``buildtools``, ``mimetools``, - ``mpz``, ``multifile``, - ``posixfile``, - ``regsub``, ``rfc822``, + ``string``, + [to do] + - ``mpz``, + ``posixfile``, + ``regsub``, ``rgbimage``, ``sha``, ``statcache``, - ``string``, ``sv``, - ``TERMIOS``, + ``TERMIOS``, ``timing`` - [to do] - ``cfmfile``, ``gopherlib``, ``md5``, ``MimeWriter``, ``mimify`` [done] - ``cl``, ``sets``, ``xreadlines``, ``rotor``, ``whrandom`` [done] + Everything in lib-old [#pep4]_ [done] From python-checkins at python.org Sat Jun 2 20:33:54 2007 From: python-checkins at python.org (neal.norwitz) Date: Sat, 2 Jun 2007 20:33:54 +0200 (CEST) Subject: [Python-checkins] r55746 - python/trunk/Doc/whatsnew/whatsnew26.tex Message-ID: <20070602183354.8ABA61E4004@bag.python.org> Author: neal.norwitz Date: Sat Jun 2 20:33:53 2007 New Revision: 55746 Modified: python/trunk/Doc/whatsnew/whatsnew26.tex Log: Update expected birthday of 2.6 Modified: python/trunk/Doc/whatsnew/whatsnew26.tex ============================================================================== --- python/trunk/Doc/whatsnew/whatsnew26.tex (original) +++ python/trunk/Doc/whatsnew/whatsnew26.tex Sat Jun 2 20:33:53 2007 @@ -53,7 +53,7 @@ \tableofcontents This article explains the new features in Python 2.6. No release date -for Python 2.6 has been set; it will probably be released in late 2007. +for Python 2.6 has been set; it will probably be released in mid 2008. % Compare with previous release in 2 - 3 sentences here. From python-checkins at python.org Sat Jun 2 20:53:09 2007 From: python-checkins at python.org (neal.norwitz) Date: Sat, 2 Jun 2007 20:53:09 +0200 (CEST) Subject: [Python-checkins] r55747 - in python/branches/release25-maint: Lib/distutils/command/build_py.py Lib/distutils/tests/test_build_py.py Misc/ACKS Misc/NEWS Message-ID: <20070602185309.84C1F1E4011@bag.python.org> Author: neal.norwitz Date: Sat Jun 2 20:53:07 2007 New Revision: 55747 Modified: python/branches/release25-maint/Lib/distutils/command/build_py.py python/branches/release25-maint/Lib/distutils/tests/test_build_py.py python/branches/release25-maint/Misc/ACKS python/branches/release25-maint/Misc/NEWS Log: Backport 55731: SF 1668596/1720897: distutils now copies data files even if package_dir is empty. Modified: python/branches/release25-maint/Lib/distutils/command/build_py.py ============================================================================== --- python/branches/release25-maint/Lib/distutils/command/build_py.py (original) +++ python/branches/release25-maint/Lib/distutils/command/build_py.py Sat Jun 2 20:53:07 2007 @@ -114,7 +114,9 @@ build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = 0 + if src_dir: + plen = len(src_dir)+1 # Strip directory from globbed filenames filenames = [ Modified: python/branches/release25-maint/Lib/distutils/tests/test_build_py.py ============================================================================== --- python/branches/release25-maint/Lib/distutils/tests/test_build_py.py (original) +++ python/branches/release25-maint/Lib/distutils/tests/test_build_py.py Sat Jun 2 20:53:07 2007 @@ -1,10 +1,13 @@ """Tests for distutils.command.build_py.""" import os +import sys +import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution +from distutils.errors import DistutilsFileError from distutils.tests import support @@ -53,6 +56,38 @@ self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) + def test_empty_package_dir (self): + # See SF 1668596/1720897. + cwd = os.getcwd() + + # create the distribution files. + sources = self.mkdtemp() + open(os.path.join(sources, "__init__.py"), "w").close() + + testdir = os.path.join(sources, "doc") + os.mkdir(testdir) + open(os.path.join(testdir, "testfile"), "w").close() + + os.chdir(sources) + sys.stdout = StringIO.StringIO() + + try: + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + finally: + # Restore state. + os.chdir(cwd) + sys.stdout = sys.__stdout__ def test_suite(): return unittest.makeSuite(BuildPyTestCase) Modified: python/branches/release25-maint/Misc/ACKS ============================================================================== --- python/branches/release25-maint/Misc/ACKS (original) +++ python/branches/release25-maint/Misc/ACKS Sat Jun 2 20:53:07 2007 @@ -155,6 +155,7 @@ John DeGood Vincent Delft Roger Dev +Raghuram Devarakonda Toby Dickenson Yves Dionne Daniel Dittmar Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Sat Jun 2 20:53:07 2007 @@ -12,6 +12,9 @@ Library ------- +- SF 1668596/1720897: distutils now copies data files + even if package_dir is empty. + - Fix bug in marshal where bad data would cause a segfault due to lack of an infinite recursion check. From python-checkins at python.org Sun Jun 3 20:53:35 2007 From: python-checkins at python.org (talin) Date: Sun, 3 Jun 2007 20:53:35 +0200 (CEST) Subject: [Python-checkins] r55748 - peps/trunk/pep-3101.txt Message-ID: <20070603185335.84DD71E4005@bag.python.org> Author: talin Date: Sun Jun 3 20:53:34 2007 New Revision: 55748 Modified: peps/trunk/pep-3101.txt Log: A substantial rewrite of PEP3101. Modified: peps/trunk/pep-3101.txt ============================================================================== --- peps/trunk/pep-3101.txt (original) +++ peps/trunk/pep-3101.txt Sun Jun 3 20:53:34 2007 @@ -26,10 +26,10 @@ - The string.Template module. [2] - The scope of this PEP will be restricted to proposals for built-in + The primary scope of this PEP concerns proposals for built-in string formatting operations (in other words, methods of the built-in string type). - + The '%' operator is primarily limited by the fact that it is a binary operator, and therefore can take at most two arguments. One of those arguments is already dedicated to the format string, @@ -42,8 +42,14 @@ While there is some overlap between this proposal and string.Template, it is felt that each serves a distinct need, - and that one does not obviate the other. In any case, - string.Template will not be discussed here. + and that one does not obviate the other. This proposal is for + a mechanism which, like '%', is efficient for small strings + which are only used once, so, for example, compilation of a + string into a template is not contemplated in this proposal, + although the proposal does take care to define format strings + and the API in such a way that an efficient template package + could reuse the syntax and even some of the underlying + formatting code. Specification @@ -53,39 +59,43 @@ - Specification of a new formatting method to be added to the built-in string class. + - Specification of functions and flag values to be added to + the string module, so that the underlying formatting engine + can be used with additional options. + - Specification of a new syntax for format strings. - - Specification of a new set of class methods to control the + - Specification of a new set of special methods to control the formatting and conversion of objects. - Specification of an API for user-defined formatting classes. - Specification of how formatting errors are handled. - - Note on string encodings: Since this PEP is being targeted - at Python 3.0, it is assumed that all strings are unicode strings, + + Note on string encodings: When discussing this PEP in the context + of Python 3.0, it is assumed that all strings are unicode strings, and that the use of the word 'string' in the context of this document will generally refer to a Python 3.0 string, which is the same as Python 2.x unicode object. - - If it should happen that this functionality is backported to - the 2.x series, then it will be necessary to handle both regular - string as well as unicode objects. All of the function call - interfaces described in this PEP can be used for both strings - and unicode objects, and in all cases there is sufficient - information to be able to properly deduce the output string - type (in other words, there is no need for two separate APIs). - In all cases, the type of the template string dominates - that + + In the context of Python 2.x, the use of the word 'string' in this + document refers to an object which may either be a regular string + or a unicode object. All of the function call interfaces + described in this PEP can be used for both strings and unicode + objects, and in all cases there is sufficient information + to be able to properly deduce the output string type (in + other words, there is no need for two separate APIs). + In all cases, the type of the format string dominates - that is, the result of the conversion will always result in an object that contains the same representation of characters as the - input template string. + input format string. String Methods - The build-in string class will gain a new method, 'format', - which takes takes an arbitrary number of positional and keyword - arguments: + The built-in string class (and also the unicode class in 2.6) will + gain a new method, 'format', which takes an arbitrary number of + positional and keyword arguments: "The story of {0}, {1}, and {c}".format(a, b, c=d) @@ -98,6 +108,15 @@ Format Strings + Format strings consist of intermingled character data and markup. + + Character data is data which is transferred unchanged from the + format string to the output string; markup is not transferred from + the format string directly to the output, but instead is used to + define 'replacement fields' that describes to the format engine + what should be placed in the output string in the place of the + markup. + Brace characters ('curly braces') are used to indicate a replacement field within the string: @@ -114,11 +133,11 @@ Which would produce: "My name is Fred :-{}" - + The element within the braces is called a 'field'. Fields consist of a 'field name', which can either be simple or compound, and an optional 'conversion specifier'. - + Simple and Compound Field Names @@ -126,12 +145,12 @@ must be valid base-10 integers; if names, they must be valid Python identifiers. A number is used to identify a positional argument, while a name is used to identify a keyword argument. - + A compound field name is a combination of multiple simple field names in an expression: "My name is {0.name}".format(file('out.txt')) - + This example shows the use of the 'getattr' or 'dot' operator in a field expression. The dot operator allows an attribute of an input value to be specified as the field value. @@ -142,22 +161,36 @@ Python expressions inside of strings. Only two operators are supported, the '.' (getattr) operator, and the '[]' (getitem) operator. - + + Another limitation that is defined to limit potential security + issues is that field names or attribute names beginning with an + underscore are disallowed. This enforces the common convention + that names beginning with an underscore are 'private'. + An example of the 'getitem' syntax: - + "My name is {0[name]}".format(dict(name='Fred')) - + It should be noted that the use of 'getitem' within a string is much more limited than its normal use. In the above example, the string 'name' really is the literal string 'name', not a variable - named 'name'. The rules for parsing an item key are the same as - for parsing a simple name - in other words, if it looks like a - number, then its treated as a number, if it looks like an - identifier, then it is used as a string. - + named 'name'. The rules for parsing an item key are very simple. + If it starts with a digit, then its treated as a number, otherwise + it is used as a string. + It is not possible to specify arbitrary dictionary keys from within a format string. + Implementation note: The implementation of this proposal is + not required to enforce the rule about a name being a valid + Python identifier. Instead, it will rely on the getattr function + of the underlying object to throw an exception if the identifier + is not legal. The format function will have a minimalist parser + which only attempts to figure out when it is "done" with an + identifier (by finding a '.' or a ']', or '}', etc.) The only + exception to this laissez-faire approach is that, by default, + strings are not allowed to have leading underscores. + Conversion Specifiers @@ -176,9 +209,9 @@ Conversion specifiers can themselves contain replacement fields. For example, a field whose field width is itself a parameter could be specified via: - + "{0:{1}}".format(a, b, c) - + Note that the doubled '}' at the end, which would normally be escaped, is not escaped in this case. The reason is because the '{{' and '}}' syntax for escapes is only applied when used @@ -201,13 +234,13 @@ differences. The standard conversion specifiers fall into three major categories: string conversions, integer conversions and floating point conversions. - + The general form of a standard conversion specifier is: [[fill]align][sign][width][.precision][type] The brackets ([]) indicate an optional element. - + Then the optional align flag can be one of the following: '<' - Forces the field to be left-aligned within the available @@ -217,18 +250,20 @@ '=' - Forces the padding to be placed after the sign (if any) but before the digits. This is used for printing fields in the form '+000000120'. - + '^' - Forces the field to be centered within the available + space. + Note that unless a minimum field width is defined, the field width will always be the same size as the data to fill it, so that the alignment option has no meaning in this case. - + The optional 'fill' character defines the character to be used to pad the field to the minimum width. The alignment flag must be supplied if the character is a number other than 0 (otherwise the character would be interpreted as part of the field width specifier). A zero fill character without an alignment flag implies an alignment type of '='. - + The 'sign' element can be one of the following: '+' - indicates that a sign should be used for both @@ -249,7 +284,7 @@ conversion. In a string conversion the field indicates how many characters will be used from the field content. The precision is ignored for integer conversions. - + Finally, the 'type' determines how the data should be presented. If the type field is absent, an appropriate type will be assigned based on the value to be formatted ('d' for integers and longs, @@ -307,7 +342,7 @@ "Today is: {0:a b d H:M:S Y}".format(datetime.now()) -Controlling Formatting +Controlling Formatting on a Per-Type Basis A class that wishes to implement a custom interpretation of its conversion specifiers can implement a __format__ method: @@ -334,107 +369,187 @@ 3) Otherwise, call str() or unicode() as appropriate. -User-Defined Formatting Classes +User-Defined Formatting There will be times when customizing the formatting of fields - on a per-type basis is not enough. An example might be an - accounting application, which displays negative numbers in - parentheses rather than using a negative sign. - - The string formatting system facilitates this kind of application- - specific formatting by allowing user code to directly invoke - the code that interprets format strings and fields. User-written - code can intercept the normal formatting operations on a per-field - basis, substituting their own formatting methods. - - For example, in the aforementioned accounting application, there - could be an application-specific number formatter, which reuses - the string.format templating code to do most of the work. The - API for such an application-specific formatter is up to the - application; here are several possible examples: - - cell_format("The total is: {0}", total) - - TemplateString("The total is: {0}").format(total) - - Creating an application-specific formatter is relatively straight- - forward. The string and unicode classes will have a class method - called 'cformat' that does all the actual work of formatting; The - built-in format() method is just a wrapper that calls cformat. - - The type signature for the cFormat function is as follows: - - cformat(template, format_hook, args, kwargs) - - The parameters to the cformat function are: - - -- The format template string. - -- A callable 'format hook', which is called once per field - -- A tuple containing the positional arguments - -- A dict containing the keyword arguments - - The cformat function will parse all of the fields in the format - string, and return a new string (or unicode) with all of the - fields replaced with their formatted values. - - The format hook is a callable object supplied by the user, which - is invoked once per field, and which can override the normal - formatting for that field. For each field, the cformat function - will attempt to call the field format hook with the following - arguments: - - format_hook(value, conversion) - - The 'value' field corresponds to the value being formatted, which - was retrieved from the arguments using the field name. - - The 'conversion' argument is the conversion spec part of the - field, which will be either a string or unicode object, depending - on the type of the original format string. - - The field_hook will be called once per field. The field_hook may - take one of two actions: - - 1) Return a string or unicode object that is the result - of the formatting operation. - - 2) Return None, indicating that the field_hook will not - process this field and the default formatting should be - used. This decision should be based on the type of the - value object, and the contents of the conversion string. + on a per-type basis is not enough. An example might be a + spreadsheet application, which displays hash marks '#' when a value + is too large to fit in the available space. + + For more powerful and flexible formatting, access to the underlying + format engine can be obtained through the 'Formatter' class that + lives in the 'string' module. This class takes additional options + which are not accessible via the normal str.format method. + + An application can create their own Formatter instance which has + customized behavior, either by setting the properties of the + Formatter instance, or by subclassing the Formatter class. + + The PEP does not attempt to exactly specify all methods and + properties defined by the Formatter class; Instead, those will be + defined and documented in the initial implementation. However, this + PEP will specify the general requirements for the Formatter class, + which are listed below. + + +Formatter Creation and Initialization + + The Formatter class takes a single initialization argument, 'flags': + + Formatter(flags=0) + + The 'flags' argument is used to control certain subtle behavioral + differences in formatting that would be cumbersome to change via + subclassing. The flags values are defined as static variables + in the "Formatter" class: + + Formatter.ALLOW_LEADING_UNDERSCORES + + By default, leading underscores are not allowed in identifier + lookups (getattr or getitem). Setting this flag will allow + this. + + Formatter.CHECK_UNUSED_POSITIONAL + + If this flag is set, the any positional arguments which are + supplied to the 'format' method but which are not used by + the format string will cause an error. + + Formatter.CHECK_UNUSED_NAME + + If this flag is set, the any named arguments which are + supplied to the 'format' method but which are not used by + the format string will cause an error. + + +Formatter Methods + + The methods of class Formatter are as follows: + + -- format(format_string, *args, **kwargs) + -- vformat(format_string, args, kwargs) + -- get_positional(args, index) + -- get_named(kwds, name) + -- format_field(value, conversion) + + 'format' is the primary API method. It takes a format template, + and an arbitrary set of positional and keyword argument. 'format' + is just a wrapper that calls 'vformat'. + + 'vformat' is the function that does the actual work of formatting. It + is exposed as a separate function for cases where you want to pass in + a predefined dictionary of arguments, rather than unpacking and + repacking the dictionary as individual arguments using the '*args' and + '**kwds' syntax. 'vformat' does the work of breaking up the format + template string into character data and replacement fields. It calls + the 'get_positional' and 'get_index' methods as appropriate. + + Note that the checking of unused arguments, and the restriction on + leading underscores in attribute names are also done in this function. + + 'get_positional' and 'get_named' are used to retrieve a given field + value. For compound field names, these functions are only called for + the first component of the field name; Subsequent components are + handled through normal attribute and indexing operations. So for + example, the field expression '0.name' would cause 'get_positional' to + be called with the list of positional arguments and a numeric index of + 0, and then the standard 'getattr' function would be called to get the + 'name' attribute of the result. + + If the index or keyword refers to an item that does not exist, then an + IndexError/KeyError will be raised. + + 'format_field' actually generates the text for a replacement field. + The 'value' argument corresponds to the value being formatted, which + was retrieved from the arguments using the field name. The + 'conversion' argument is the conversion spec part of the field, which + will be either a string or unicode object, depending on the type of + the original format string. + + Note: The final implementation of the Formatter class may define + additional overridable methods and hooks. In particular, it may be + that 'vformat' is itself a composition of several additional, + overridable methods. (Depending on whether it is convenient to the + implementor of Formatter.) + + +Customizing Formatters + + This section describes some typical ways that Formatter objects + can be customized. + + To support alternative format-string syntax, the 'vformat' method + can be overridden to alter the way format strings are parsed. + + One common desire is to support a 'default' namespace, so that + you don't need to pass in keyword arguments to the format() + method, but can instead use values in a pre-existing namespace. + This can easily be done by overriding get_named() as follows: + + class NamespaceFormatter(Formatter): + def __init__(self, namespace={}, flags=0): + Formatter.__init__(self, flags) + self.namespace = namespace + + def get_named(self, kwds, name): + try: + # Check explicitly passed arguments first + return kwds[name] + except KeyError: + return self.namespace[name] + + One can use this to easily create a formatting function that allows + access to global variables, for example: + + fmt = NamespaceFormatter(globals()) + + greeting = "hello" + print(fmt("{greeting}, world!")) + + A similar technique can be done with the locals() dictionary to + gain access to the locals dictionary. + + It would also be possible to create a 'smart' namespace formatter + that could automatically access both locals and globals through + snooping of the calling stack. Due to the need for compatibility + the different versions of Python, such a capability will not be + included in the standard library, however it is anticipated that + someone will create and publish a recipe for doing this. + + Another type of customization is to change the way that built-in + types are formatted by overriding the 'format_field' method. (For + non-built-in types, you can simply define a __format__ special + method on that type.) So for example, you could override the + formatting of numbers to output scientific notation when needed. Error handling - The string formatting system has two error handling modes, which - are controlled by the value of a class variable: - - string.strict_format_errors = True - - The 'strict_format_errors' flag defaults to False, or 'lenient' - mode. Setting it to True enables 'strict' mode. The current mode - determines how errors are handled, depending on the type of the - error. - - The types of errors that can occur are: - - 1) Reference to a missing or invalid argument from within a - field specifier. In strict mode, this will raise an exception. - In lenient mode, this will cause the value of the field to be - replaced with the string '?name?', where 'name' will be the - type of error (KeyError, IndexError, or AttributeError). - - So for example: - - >>> string.strict_format_errors = False - >>> print 'Item 2 of argument 0 is: {0[2]}'.format( [0,1] ) - "Item 2 of argument 0 is: ?IndexError?" - - 2) Unused argument. In strict mode, this will raise an exception. - In lenient mode, this will be ignored. - - 3) Exception raised by underlying formatter. These exceptions - are always passed through, regardless of the current mode. + There are two classes of exceptions which can occur during formatting: + exceptions generated by the formatter code itself, and exceptions + generated by user code (such as a field object's getattr function, or + the field_hook function). + + In general, exceptions generated by the formatter code itself are + of the "ValueError" variety -- there is an error in the actual "value" + of the format string. (This is not always true; for example, the + string.format() function might be passed a non-string as its first + parameter, which would result in a TypeError.) + + The text associated with these internally generated ValueError + exceptions will indicate the location of the exception inside + the format string, as well as the nature of the exception. + + For exceptions generated by user code, a trace record and + dummy frame will be added to the traceback stack to help + in determining the location in the string where the exception + occurred. The inserted traceback will indicate that the + error occurred at: + + File ";", line XX, in column_YY + + where XX and YY represent the line and character position + information in the string, respectively. Alternate Syntax @@ -483,9 +598,9 @@ - Other variations include Ruby's #{}, PHP's {$name}, and so on. - + Some specific aspects of the syntax warrant additional comments: - + 1) Backslash character for escapes. The original version of this PEP used backslash rather than doubling to escape a bracket. This worked because backslashes in Python string literals that @@ -494,18 +609,66 @@ of confusion, and led to potential situations of multiple recursive escapes, i.e. '\\\\{' to place a literal backslash in front of a bracket. - + 2) The use of the colon character (':') as a separator for conversion specifiers. This was chosen simply because that's what .Net uses. - + + +Security Considerations + + Historically, string formatting has been a common source of + security holes in web-based applications, particularly if the + string templating system allows arbitrary expressions to be + embedded in format strings. + + The typical scenario is one where the string data being processed + is coming from outside the application, perhaps from HTTP headers + or fields within a web form. An attacker could substitute their + own strings designed to cause havok. + + The string formatting system outlined in this PEP is by no means + 'secure', in the sense that no Python library module can, on its + own, guarantee security, especially given the open nature of + the Python language. Building a secure application requires a + secure approach to design. + + What this PEP does attempt to do is make the job of designing a + secure application easier, by making it easier for a programmer + to reason about the possible consequences of a string formatting + operation. It does this by limiting those consequences to a smaller + and more easier understood subset. + + For example, because it is possible in Python to override the + 'getattr' operation of a type, the interpretation of a compound + replacement field such as "0.name" could potentially run + arbitrary code. + + However, it is *extremely* rare for the mere retrieval of an + attribute to have side effects. Other operations which are more + likely to have side effects - such as method calls - are disallowed. + Thus, a programmer can be reasonably assured that no string + formatting operation will cause a state change in the program. + This assurance is not only useful in securing an application, but + in debugging it as well. + + Similarly, the restriction on field names beginning with + underscores is intended to provide similar assurances about the + visibility of private data. + + Of course, programmers would be well-advised to avoid using + any external data as format strings, and instead use that data + as the format arguments instead. + Sample Implementation - A rough prototype of the underlying 'cformat' function has been - coded in Python, however it needs much refinement before being - submitted. - + An implementation of an earlier version of this PEP was created by + Patrick Maupin and Eric V. Smith, and can be found in the pep3101 + sandbox at: + + http://svn.python.org/view/sandbox/trunk/pep3101/ + Backwards Compatibility From python-checkins at python.org Sun Jun 3 21:50:54 2007 From: python-checkins at python.org (brett.cannon) Date: Sun, 3 Jun 2007 21:50:54 +0200 (CEST) Subject: [Python-checkins] r55749 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070603195054.82AE51E400C@bag.python.org> Author: brett.cannon Date: Sun Jun 3 21:50:53 2007 New Revision: 55749 Added: sandbox/trunk/import_in_py/pseudocode.py (contents, props changed) Log: Begin a file containing the pseudocode of how imports work. Added: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- (empty file) +++ sandbox/trunk/import_in_py/pseudocode.py Sun Jun 3 21:50:53 2007 @@ -0,0 +1,21 @@ +"""Pseudocode to explain how importing works. + +Caveats: + + Classic relative import semantics are not currently covered. + + Assume all code runs with the import lock held. + +""" +if level != 0: # Relative import. + name = resolve_name(name, level) # XXX +# Import each parent in the name, starting at root. +# Skipping over details of constructing each parent name and setting the proper +# attribute on the parent for newly imported modules. +for parent in name: + if parent in sys.modules: + continue + for meta_importer in sys.meta_path: + check_meta_path(parent, meta_importer) # XXX + for path_entry in sys.path: + check_path(parent, path_entry) # XXX + # XXX error: not found +return module_to_return(path, fromlist) # XXX From python-checkins at python.org Sun Jun 3 21:52:50 2007 From: python-checkins at python.org (brett.cannon) Date: Sun, 3 Jun 2007 21:52:50 +0200 (CEST) Subject: [Python-checkins] r55750 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070603195250.157EF1E400B@bag.python.org> Author: brett.cannon Date: Sun Jun 3 21:52:47 2007 New Revision: 55750 Modified: sandbox/trunk/import_in_py/pseudocode.py Log: Put pseudocode into a function format so that one knows where arguments come from. Modified: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- sandbox/trunk/import_in_py/pseudocode.py (original) +++ sandbox/trunk/import_in_py/pseudocode.py Sun Jun 3 21:52:47 2007 @@ -1,21 +1,24 @@ -"""Pseudocode to explain how importing works. +raise ImportError("module is just pseudocode") -Caveats: - + Classic relative import semantics are not currently covered. - + Assume all code runs with the import lock held. +def __import__(name, globals, locals, fromlist, level): + """Pseudocode to explain how importing works. -""" -if level != 0: # Relative import. - name = resolve_name(name, level) # XXX -# Import each parent in the name, starting at root. -# Skipping over details of constructing each parent name and setting the proper -# attribute on the parent for newly imported modules. -for parent in name: - if parent in sys.modules: - continue - for meta_importer in sys.meta_path: - check_meta_path(parent, meta_importer) # XXX - for path_entry in sys.path: - check_path(parent, path_entry) # XXX - # XXX error: not found -return module_to_return(path, fromlist) # XXX + Caveats: + + Classic relative import semantics are not currently covered. + + Assume all code runs with the import lock held. + + """ + if level != 0: # Relative import. + name = resolve_name(name, level) # XXX + # Import each parent in the name, starting at root. + # Skipping over details of constructing each parent name and setting the + # proper attribute on the parent for newly imported modules. + for parent in name: + if parent in sys.modules: + continue + for meta_importer in sys.meta_path: + check_meta_path(parent, meta_importer) # XXX + for path_entry in sys.path: + check_path(parent, path_entry) # XXX + # XXX error: not found + return module_to_return(path, fromlist) # XXX From python-checkins at python.org Sun Jun 3 22:32:52 2007 From: python-checkins at python.org (neal.norwitz) Date: Sun, 3 Jun 2007 22:32:52 +0200 (CEST) Subject: [Python-checkins] r55751 - python/trunk/Modules/_bsddb.c Message-ID: <20070603203252.BC8441E4010@bag.python.org> Author: neal.norwitz Date: Sun Jun 3 22:32:50 2007 New Revision: 55751 Modified: python/trunk/Modules/_bsddb.c Log: Backout the original 'fix' to 1721309 which had no effect. Different versions of Berkeley DB handle this differently. The comments and bug report should have the details. Memory is allocated in 4.4 (and presumably earlier), but not in 4.5. Thus 4.5 has the free error, but not earlier versions. Mostly update comments, plus make the free conditional. This fix was already applied to the 2.5 branch. Modified: python/trunk/Modules/_bsddb.c ============================================================================== --- python/trunk/Modules/_bsddb.c (original) +++ python/trunk/Modules/_bsddb.c Sun Jun 3 22:32:50 2007 @@ -1713,6 +1713,7 @@ PyObject* dataobj; PyObject* retval = NULL; DBT key, data; + void *orig_data; DB_TXN *txn = NULL; static char* kwnames[] = { "key", "data", "txn", "flags", NULL }; @@ -1724,7 +1725,6 @@ CHECK_DB_NOT_CLOSED(self); if (!make_key_dbt(self, keyobj, &key, NULL)) return NULL; - CLEAR_DBT(data); if ( !make_dbt(dataobj, &data) || !checkTxnObj(txnobj, &txn) ) { @@ -1733,13 +1733,12 @@ } flags |= DB_GET_BOTH; + orig_data = data.data; if (CHECK_DBFLAG(self, DB_THREAD)) { /* Tell BerkeleyDB to malloc the return value (thread safe) */ + /* XXX(nnorwitz): At least 4.4.20 and 4.5.20 require this flag. */ data.flags = DB_DBT_MALLOC; - /* TODO: Is this flag needed? We're passing a data object that should - match what's in the DB, so there should be no need to malloc. - We run the risk of freeing something twice! Check this. */ } MYDB_BEGIN_ALLOW_THREADS; @@ -1753,8 +1752,13 @@ retval = Py_None; } else if (!err) { + /* XXX(nnorwitz): can we do: retval = dataobj; Py_INCREF(retval); */ retval = PyString_FromStringAndSize((char*)data.data, data.size); - FREE_DBT(data); /* Only if retrieval was successful */ + + /* Even though the flags require DB_DBT_MALLOC, data is not always + allocated. 4.4: allocated, 4.5: *not* allocated. :-( */ + if (data.data != orig_data) + FREE_DBT(data); } FREE_DBT(key); From nnorwitz at gmail.com Sun Jun 3 23:09:20 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 3 Jun 2007 17:09:20 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070603210920.GA25476@python.psfb.org> test_smtplib leaked [87, -87, 0] references, sum=0 test_sys leaked [0, 0, 132] references, sum=132 From python-checkins at python.org Mon Jun 4 01:13:46 2007 From: python-checkins at python.org (brett.cannon) Date: Mon, 4 Jun 2007 01:13:46 +0200 (CEST) Subject: [Python-checkins] r55752 - in python/trunk: Lib/_strptime.py Lib/test/test_strptime.py Misc/NEWS Message-ID: <20070603231346.E2A761E4005@bag.python.org> Author: brett.cannon Date: Mon Jun 4 01:13:41 2007 New Revision: 55752 Modified: python/trunk/Lib/_strptime.py python/trunk/Lib/test/test_strptime.py python/trunk/Misc/NEWS Log: Make _strptime.TimeRE().pattern() use ``\s+`` for matching whitespace instead of ``\s*``. This prevents patterns from "stealing" bits from other patterns in order to make a match work. Closes bug #1730389. Will be backported. Modified: python/trunk/Lib/_strptime.py ============================================================================== --- python/trunk/Lib/_strptime.py (original) +++ python/trunk/Lib/_strptime.py Mon Jun 4 01:13:41 2007 @@ -250,7 +250,7 @@ regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") format = regex_chars.sub(r"\\\1", format) whitespace_replacement = re_compile('\s+') - format = whitespace_replacement.sub('\s*', format) + format = whitespace_replacement.sub('\s+', format) while '%' in format: directive_index = format.index('%')+1 processed_format = "%s%s%s" % (processed_format, Modified: python/trunk/Lib/test/test_strptime.py ============================================================================== --- python/trunk/Lib/test/test_strptime.py (original) +++ python/trunk/Lib/test/test_strptime.py Mon Jun 4 01:13:41 2007 @@ -190,6 +190,15 @@ "locale data that contains regex metacharacters is not" " properly escaped") + def test_whitespace_substitution(self): + # When pattern contains whitespace, make sure it is taken into account + # so as to not allow to subpatterns to end up next to each other and + # "steal" characters from each other. + pattern = self.time_re.pattern('%j %H') + self.failUnless(not re.match(pattern, "180")) + self.failUnless(re.match(pattern, "18 0")) + + class StrptimeTests(unittest.TestCase): """Tests for _strptime.strptime.""" Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jun 4 01:13:41 2007 @@ -222,6 +222,9 @@ Library ------- +- Bug #1730389: Change time.strptime() to use ``\s+`` instead of ``\s*`` when + matching spaces in the specified format argument. + - SF 1668596/1720897: distutils now copies data files even if package_dir is empty. From python-checkins at python.org Mon Jun 4 02:14:07 2007 From: python-checkins at python.org (brett.cannon) Date: Mon, 4 Jun 2007 02:14:07 +0200 (CEST) Subject: [Python-checkins] r55753 - in python/branches/release25-maint: Lib/_strptime.py Lib/test/test_strptime.py Misc/NEWS Message-ID: <20070604001407.9DA741E4002@bag.python.org> Author: brett.cannon Date: Mon Jun 4 02:14:06 2007 New Revision: 55753 Modified: python/branches/release25-maint/Lib/_strptime.py python/branches/release25-maint/Lib/test/test_strptime.py python/branches/release25-maint/Misc/NEWS Log: Backport of r55752: make time.strptime() behave better when whitespace is in the format arguments. Modified: python/branches/release25-maint/Lib/_strptime.py ============================================================================== --- python/branches/release25-maint/Lib/_strptime.py (original) +++ python/branches/release25-maint/Lib/_strptime.py Mon Jun 4 02:14:06 2007 @@ -253,7 +253,7 @@ regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") format = regex_chars.sub(r"\\\1", format) whitespace_replacement = re_compile('\s+') - format = whitespace_replacement.sub('\s*', format) + format = whitespace_replacement.sub('\s+', format) while '%' in format: directive_index = format.index('%')+1 processed_format = "%s%s%s" % (processed_format, Modified: python/branches/release25-maint/Lib/test/test_strptime.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_strptime.py (original) +++ python/branches/release25-maint/Lib/test/test_strptime.py Mon Jun 4 02:14:06 2007 @@ -190,6 +190,15 @@ "locale data that contains regex metacharacters is not" " properly escaped") + def test_whitespace_substitution(self): + # When pattern contains whitespace, make sure it is taken into account + # so as to not allow to subpatterns to end up next to each other and + # "steal" characters from each other. + pattern = self.time_re.pattern('%j %H') + self.failUnless(not re.match(pattern, "180")) + self.failUnless(re.match(pattern, "18 0")) + + class StrptimeTests(unittest.TestCase): """Tests for _strptime.strptime.""" Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Mon Jun 4 02:14:06 2007 @@ -12,6 +12,9 @@ Library ------- +- Bug #1730389: Have time.strptime() match spaces in a format argument with + ``\s+`` instead of ``\s*``. + - SF 1668596/1720897: distutils now copies data files even if package_dir is empty. From buildbot at python.org Mon Jun 4 02:28:23 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 04 Jun 2007 00:28:23 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-2 2.5 Message-ID: <20070604002823.675881E4002@bag.python.org> The Buildbot has detected a new failure of x86 XP-2 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-2%25202.5/builds/7 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: brett.cannon Build had warnings: warnings failed slave lost sincerely, -The Buildbot From python-checkins at python.org Tue Jun 5 01:45:31 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 5 Jun 2007 01:45:31 +0200 (CEST) Subject: [Python-checkins] r55756 - in python/branches/cpy_merge: Demo/imputil/knee.py Demo/pdist/cvslock.py Doc/Makefile Doc/Makefile.deps Doc/api/utilities.tex Doc/ext/extending.tex Doc/howto/functional.rst Doc/lib/lib.tex Doc/lib/libcodecs.tex Doc/lib/libfuncs.tex Doc/lib/libimp.tex Doc/lib/libitertools.tex Doc/lib/liblogging.tex Doc/lib/libmimewriter.tex Doc/lib/libmimify.tex Doc/lib/libpickle.tex Doc/lib/libposixfile.tex Doc/lib/libshlex.tex Doc/lib/libsubprocess.tex Doc/lib/libsys.tex Doc/lib/libtarfile.tex Doc/lib/libtypes.tex Doc/lib/libundoc.tex Doc/lib/libzipimport.tex Doc/mac/undoc.tex Doc/ref/ref3.tex Doc/tut/tut.tex Doc/whatsnew/whatsnew30.tex Grammar/Grammar Lib/MimeWriter.py Lib/SocketServer.py Lib/bsddb/test/test_thread.py Lib/ctypes/wintypes.py Lib/dis.py Lib/idlelib/StackViewer.py Lib/ihooks.py Lib/imputil.py Lib/logging/__init__.py Lib/logging/handlers.py Lib/mimify.py Lib/optparse.py Lib/os.py Lib/plat-mac/buildtools.py Lib/plat-mac/cfmfile.py Lib/posixfile.py Lib/pydoc.py Lib/sha.py Lib/shlex.py Lib/subprocess.py Lib/tarfile.py Lib/test/dis_module.py Lib/test/infinite_reload.py Lib/test/output/test_pkg Lib/test/regrtest.py Lib/test/test_MimeWriter.py Lib/test/test___all__.py Lib/test/test_builtin.py Lib/test/test_dis.py Lib/test/test_doctest.py Lib/test/test_hmac.py Lib/test/test_import.py Lib/test/test_importhooks.py Lib/test/test_inspect.py Lib/test/test_optparse.py Lib/test/test_os.py Lib/test/test_pkg.py Lib/test/test_subprocess.py Lib/test/test_sundry.py Lib/test/test_syntax.py Lib/test/test_sys.py Lib/test/test_tarfile.py Lib/test/test_tokenize.py Lib/test/test_traceback.py Lib/test/test_urllib.py Lib/test/test_xmlrpc.py Lib/test/test_zipfile.py Lib/test/testtar.tar Lib/textwrap.py Lib/unittest.py Lib/urllib.py Lib/uuid.py Lib/wsgiref/handlers.py Lib/xmlrpclib.py Misc/BeOS-setup.py Misc/NEWS Misc/build.sh Misc/cheatsheet Modules/Setup.dist Modules/_bytes_iomodule.c Modules/_ctypes/callbacks.c Modules/cstubs Modules/md5.c Modules/md5.h Modules/md5module.c Modules/shamodule.c Modules/timing.h Modules/timingmodule.c PC/WinMain.c PC/_winreg.c PC/dl_nt.c PC/os2emx/Makefile PC/os2emx/config.c PC/os2emx/python25.def PC/os2vacpp/makefile PC/os2vacpp/makefile.omk PC/pyconfig.h PC/winsound.c PCbuild/pythoncore.vcproj PCbuild8/pythoncore/pythoncore.vcproj Python/ast.c Python/bltinmodule.c Python/ceval.c Python/dynload_win.c Python/graminit.c Python/import.c Python/sysmodule.c README setup.py Message-ID: <20070604234531.EC0D91E4002@bag.python.org> Author: alexandre.vassalotti Date: Tue Jun 5 01:44:17 2007 New Revision: 55756 Added: python/branches/cpy_merge/Doc/whatsnew/whatsnew30.tex - copied unchanged from r55755, python/branches/p3yk/Doc/whatsnew/whatsnew30.tex python/branches/cpy_merge/Lib/test/dis_module.py - copied unchanged from r55755, python/branches/p3yk/Lib/test/dis_module.py Removed: python/branches/cpy_merge/Doc/lib/libmimewriter.tex python/branches/cpy_merge/Doc/lib/libmimify.tex python/branches/cpy_merge/Doc/lib/libposixfile.tex python/branches/cpy_merge/Lib/MimeWriter.py python/branches/cpy_merge/Lib/mimify.py python/branches/cpy_merge/Lib/plat-mac/cfmfile.py python/branches/cpy_merge/Lib/posixfile.py python/branches/cpy_merge/Lib/sha.py python/branches/cpy_merge/Lib/test/infinite_reload.py python/branches/cpy_merge/Lib/test/test_MimeWriter.py python/branches/cpy_merge/Modules/cstubs python/branches/cpy_merge/Modules/md5.c python/branches/cpy_merge/Modules/md5.h python/branches/cpy_merge/Modules/md5module.c python/branches/cpy_merge/Modules/shamodule.c python/branches/cpy_merge/Modules/timing.h python/branches/cpy_merge/Modules/timingmodule.c Modified: python/branches/cpy_merge/ (props changed) python/branches/cpy_merge/Demo/imputil/knee.py python/branches/cpy_merge/Demo/pdist/cvslock.py python/branches/cpy_merge/Doc/Makefile python/branches/cpy_merge/Doc/Makefile.deps python/branches/cpy_merge/Doc/api/utilities.tex python/branches/cpy_merge/Doc/ext/extending.tex python/branches/cpy_merge/Doc/howto/functional.rst python/branches/cpy_merge/Doc/lib/lib.tex python/branches/cpy_merge/Doc/lib/libcodecs.tex python/branches/cpy_merge/Doc/lib/libfuncs.tex python/branches/cpy_merge/Doc/lib/libimp.tex python/branches/cpy_merge/Doc/lib/libitertools.tex python/branches/cpy_merge/Doc/lib/liblogging.tex python/branches/cpy_merge/Doc/lib/libpickle.tex python/branches/cpy_merge/Doc/lib/libshlex.tex python/branches/cpy_merge/Doc/lib/libsubprocess.tex python/branches/cpy_merge/Doc/lib/libsys.tex python/branches/cpy_merge/Doc/lib/libtarfile.tex python/branches/cpy_merge/Doc/lib/libtypes.tex python/branches/cpy_merge/Doc/lib/libundoc.tex python/branches/cpy_merge/Doc/lib/libzipimport.tex python/branches/cpy_merge/Doc/mac/undoc.tex python/branches/cpy_merge/Doc/ref/ref3.tex python/branches/cpy_merge/Doc/tut/tut.tex python/branches/cpy_merge/Grammar/Grammar python/branches/cpy_merge/Lib/SocketServer.py python/branches/cpy_merge/Lib/bsddb/test/test_thread.py python/branches/cpy_merge/Lib/ctypes/wintypes.py python/branches/cpy_merge/Lib/dis.py python/branches/cpy_merge/Lib/idlelib/StackViewer.py python/branches/cpy_merge/Lib/ihooks.py python/branches/cpy_merge/Lib/imputil.py python/branches/cpy_merge/Lib/logging/__init__.py python/branches/cpy_merge/Lib/logging/handlers.py python/branches/cpy_merge/Lib/optparse.py python/branches/cpy_merge/Lib/os.py python/branches/cpy_merge/Lib/plat-mac/buildtools.py python/branches/cpy_merge/Lib/pydoc.py python/branches/cpy_merge/Lib/shlex.py python/branches/cpy_merge/Lib/subprocess.py python/branches/cpy_merge/Lib/tarfile.py python/branches/cpy_merge/Lib/test/output/test_pkg python/branches/cpy_merge/Lib/test/regrtest.py python/branches/cpy_merge/Lib/test/test___all__.py python/branches/cpy_merge/Lib/test/test_builtin.py python/branches/cpy_merge/Lib/test/test_dis.py python/branches/cpy_merge/Lib/test/test_doctest.py python/branches/cpy_merge/Lib/test/test_hmac.py python/branches/cpy_merge/Lib/test/test_import.py python/branches/cpy_merge/Lib/test/test_importhooks.py python/branches/cpy_merge/Lib/test/test_inspect.py python/branches/cpy_merge/Lib/test/test_optparse.py python/branches/cpy_merge/Lib/test/test_os.py python/branches/cpy_merge/Lib/test/test_pkg.py python/branches/cpy_merge/Lib/test/test_subprocess.py python/branches/cpy_merge/Lib/test/test_sundry.py python/branches/cpy_merge/Lib/test/test_syntax.py python/branches/cpy_merge/Lib/test/test_sys.py python/branches/cpy_merge/Lib/test/test_tarfile.py python/branches/cpy_merge/Lib/test/test_tokenize.py python/branches/cpy_merge/Lib/test/test_traceback.py python/branches/cpy_merge/Lib/test/test_urllib.py python/branches/cpy_merge/Lib/test/test_xmlrpc.py python/branches/cpy_merge/Lib/test/test_zipfile.py python/branches/cpy_merge/Lib/test/testtar.tar python/branches/cpy_merge/Lib/textwrap.py python/branches/cpy_merge/Lib/unittest.py python/branches/cpy_merge/Lib/urllib.py python/branches/cpy_merge/Lib/uuid.py python/branches/cpy_merge/Lib/wsgiref/handlers.py python/branches/cpy_merge/Lib/xmlrpclib.py python/branches/cpy_merge/Misc/BeOS-setup.py python/branches/cpy_merge/Misc/NEWS python/branches/cpy_merge/Misc/build.sh python/branches/cpy_merge/Misc/cheatsheet python/branches/cpy_merge/Modules/Setup.dist python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_ctypes/callbacks.c python/branches/cpy_merge/PC/WinMain.c python/branches/cpy_merge/PC/_winreg.c python/branches/cpy_merge/PC/dl_nt.c python/branches/cpy_merge/PC/os2emx/Makefile python/branches/cpy_merge/PC/os2emx/config.c python/branches/cpy_merge/PC/os2emx/python25.def python/branches/cpy_merge/PC/os2vacpp/makefile python/branches/cpy_merge/PC/os2vacpp/makefile.omk python/branches/cpy_merge/PC/pyconfig.h python/branches/cpy_merge/PC/winsound.c python/branches/cpy_merge/PCbuild/pythoncore.vcproj python/branches/cpy_merge/PCbuild8/pythoncore/pythoncore.vcproj python/branches/cpy_merge/Python/ast.c python/branches/cpy_merge/Python/bltinmodule.c python/branches/cpy_merge/Python/ceval.c python/branches/cpy_merge/Python/dynload_win.c python/branches/cpy_merge/Python/graminit.c python/branches/cpy_merge/Python/import.c python/branches/cpy_merge/Python/sysmodule.c python/branches/cpy_merge/README python/branches/cpy_merge/setup.py Log: Merged revisions 55623-55755 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/p3yk ................ r55629 | brett.cannon | 2007-05-28 20:06:59 -0400 (Mon, 28 May 2007) | 3 lines Delete the cstubs module. Used as input to Modules/cgen.py to generate the gl module which has already been removed. ................ r55636 | neal.norwitz | 2007-05-29 03:06:39 -0400 (Tue, 29 May 2007) | 149 lines Merged revisions 55506-55635 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r55507 | georg.brandl | 2007-05-22 07:28:17 -0700 (Tue, 22 May 2007) | 2 lines Remove the "panel" module doc file which has been ignored since 1994. ........ r55522 | mark.hammond | 2007-05-22 19:04:28 -0700 (Tue, 22 May 2007) | 4 lines Remove definition of PY_UNICODE_TYPE from pyconfig.h, allowing the definition in unicodeobject.h to be used, giving us the desired wchar_t in place of 'unsigned short'. As discussed on python-dev. ........ r55525 | neal.norwitz | 2007-05-22 23:35:32 -0700 (Tue, 22 May 2007) | 6 lines Add -3 option to the interpreter to warn about features that are deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc. ........ r55527 | neal.norwitz | 2007-05-22 23:57:35 -0700 (Tue, 22 May 2007) | 1 line Whitespace cleanup ........ r55528 | neal.norwitz | 2007-05-22 23:58:36 -0700 (Tue, 22 May 2007) | 1 line Add a bunch more deprecation warnings for builtins that are going away in 3.0 ........ r55549 | georg.brandl | 2007-05-24 09:49:29 -0700 (Thu, 24 May 2007) | 2 lines shlex.split() now has an optional "posix" parameter. ........ r55550 | georg.brandl | 2007-05-24 10:33:33 -0700 (Thu, 24 May 2007) | 2 lines Fix parameter passing. ........ r55555 | facundo.batista | 2007-05-24 10:50:54 -0700 (Thu, 24 May 2007) | 6 lines Added an optional timeout parameter to urllib.ftpwrapper, with tests (for this and a basic one, because there weren't any). Changed also NEWS, but didn't find documentation for this function, assumed it wasn't public... ........ r55563 | facundo.batista | 2007-05-24 13:01:59 -0700 (Thu, 24 May 2007) | 4 lines Removed the .recv() in the test, is not necessary, and was causing problems that didn't have anything to do with was actually being tested... ........ r55564 | facundo.batista | 2007-05-24 13:51:19 -0700 (Thu, 24 May 2007) | 5 lines Let's see if reading exactly what is written allow this live test to pass (now I know why there were so few tests in ftp, http, etc, :( ). ........ r55567 | facundo.batista | 2007-05-24 20:10:28 -0700 (Thu, 24 May 2007) | 4 lines Trying to make the tests work in Windows and Solaris, everywhere else just works ........ r55568 | facundo.batista | 2007-05-24 20:47:19 -0700 (Thu, 24 May 2007) | 4 lines Fixing stupid error, and introducing a sleep, to see if the other thread is awakened and finish sending data. ........ r55569 | facundo.batista | 2007-05-24 21:20:22 -0700 (Thu, 24 May 2007) | 4 lines Commenting out the tests until find out who can test them in one of the problematic enviroments. ........ r55570 | neal.norwitz | 2007-05-24 22:13:40 -0700 (Thu, 24 May 2007) | 2 lines Get test passing again by commenting out the reference to the test class. ........ r55575 | vinay.sajip | 2007-05-25 00:05:59 -0700 (Fri, 25 May 2007) | 1 line Updated docstring for SysLogHandler (#1720726). ........ r55576 | vinay.sajip | 2007-05-25 00:06:55 -0700 (Fri, 25 May 2007) | 1 line Updated documentation for SysLogHandler (#1720726). ........ r55592 | brett.cannon | 2007-05-25 13:17:15 -0700 (Fri, 25 May 2007) | 3 lines Remove direct call's to file's constructor and replace them with calls to open() as ths is considered best practice. ........ r55601 | kristjan.jonsson | 2007-05-26 12:19:50 -0700 (Sat, 26 May 2007) | 1 line Remove the rgbimgmodule from PCBuild8 ........ r55602 | kristjan.jonsson | 2007-05-26 12:31:39 -0700 (Sat, 26 May 2007) | 1 line Include after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds. ........ r55603 | walter.doerwald | 2007-05-26 14:04:13 -0700 (Sat, 26 May 2007) | 2 lines Fix typo. ........ r55604 | peter.astrand | 2007-05-26 15:18:20 -0700 (Sat, 26 May 2007) | 1 line Applied patch 1669481, slightly modified: Support close_fds on Win32 ........ r55606 | neal.norwitz | 2007-05-26 21:08:54 -0700 (Sat, 26 May 2007) | 2 lines Add the new function object attribute names from py3k. ........ r55617 | lars.gustaebel | 2007-05-27 12:49:30 -0700 (Sun, 27 May 2007) | 20 lines Added errors argument to TarFile class that allows the user to specify an error handling scheme for character conversion. Additional scheme "utf-8" in read mode. Unicode input filenames are now supported by design. The values of the pax_headers dictionary are now limited to unicode objects. Fixed: The prefix field is no longer used in PAX_FORMAT (in conformance with POSIX). Fixed: In read mode use a possible pax header size field. Fixed: Strip trailing slashes from pax header name values. Fixed: Give values in user-specified pax_headers precedence when writing. Added unicode tests. Added pax/regtype4 member to testtar.tar all possible number fields in a pax header. Added two chapters to the documentation about the different formats tarfile.py supports and how unicode issues are handled. ........ r55618 | raymond.hettinger | 2007-05-27 22:23:22 -0700 (Sun, 27 May 2007) | 1 line Explain when groupby() issues a new group. ........ r55634 | martin.v.loewis | 2007-05-28 21:01:29 -0700 (Mon, 28 May 2007) | 2 lines Test pre-commit hook for a link to a .py file. ........ r55635 | martin.v.loewis | 2007-05-28 21:02:03 -0700 (Mon, 28 May 2007) | 2 lines Revert 55634. ........ ................ r55639 | neal.norwitz | 2007-05-29 03:58:11 -0400 (Tue, 29 May 2007) | 1 line Remove sys.exc_{type,exc_value,exc_traceback} ................ r55641 | neal.norwitz | 2007-05-29 04:03:50 -0400 (Tue, 29 May 2007) | 1 line Missed one sys.exc_type. I wonder why exc_{value,traceback} were already gone ................ r55642 | neal.norwitz | 2007-05-29 04:08:33 -0400 (Tue, 29 May 2007) | 1 line Missed more doc for sys.exc_* attrs. ................ r55643 | neal.norwitz | 2007-05-29 04:18:19 -0400 (Tue, 29 May 2007) | 1 line Remove sys.exc_clear() ................ r55665 | guido.van.rossum | 2007-05-29 22:45:43 -0400 (Tue, 29 May 2007) | 4 lines Make None, True, False keywords. We can now also delete all the other places that explicitly forbid assignment to None, but I'm not going to bother right now. ................ r55666 | guido.van.rossum | 2007-05-29 23:01:51 -0400 (Tue, 29 May 2007) | 3 lines Found another place that needs check for forbidden names. Fixed test_syntax.py accordingly (it helped me find that one). ................ r55668 | guido.van.rossum | 2007-05-29 23:41:48 -0400 (Tue, 29 May 2007) | 2 lines Mark None, True, False as keywords. ................ r55673 | neal.norwitz | 2007-05-30 02:28:25 -0400 (Wed, 30 May 2007) | 3 lines Get the dis module working on modules again after changing dicts to not return lists and also new-style classes. Add a test. ................ r55674 | neal.norwitz | 2007-05-30 02:35:45 -0400 (Wed, 30 May 2007) | 1 line Umm, it helps to add the module that the test uses ................ r55675 | neal.norwitz | 2007-05-30 02:53:05 -0400 (Wed, 30 May 2007) | 4 lines Try to fix up all the other places that were assigning to True/False. There's at least one more problem in test.test_xmlrpc. I have other changes in that file and that should be fixed soon (I hope). ................ r55679 | neal.norwitz | 2007-05-30 03:31:55 -0400 (Wed, 30 May 2007) | 1 line Fix up another place that was assigning to True/False. ................ r55688 | brett.cannon | 2007-05-30 17:19:47 -0400 (Wed, 30 May 2007) | 2 lines Ditch MimeWriter. ................ r55692 | brett.cannon | 2007-05-30 17:52:00 -0400 (Wed, 30 May 2007) | 2 lines Remove the mimify module. ................ r55707 | guido.van.rossum | 2007-05-31 08:08:45 -0400 (Thu, 31 May 2007) | 2 lines Backport the addition of show_code() to dis.py -- it's too handy. ................ r55708 | guido.van.rossum | 2007-05-31 09:22:57 -0400 (Thu, 31 May 2007) | 7 lines Fix a fairly long-standing bug in the check for assignment to None (and other keywords, these days). In 2.5, you could write foo(None=1) without getting a SyntaxError (although foo()'s definition would have to use **kwds to avoid getting a runtime error complaining about an unknown keyword of course). This ought to be backported to 2.5.2 or at least 2.6. ................ r55724 | brett.cannon | 2007-05-31 22:32:41 -0400 (Thu, 31 May 2007) | 2 lines Remove the cfmfile. ................ r55727 | neal.norwitz | 2007-06-01 01:19:44 -0400 (Fri, 01 Jun 2007) | 1 line Remove reload() builtin. ................ r55729 | neal.norwitz | 2007-06-01 01:51:30 -0400 (Fri, 01 Jun 2007) | 59 lines Merged revisions 55636-55728 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r55637 | georg.brandl | 2007-05-29 00:16:47 -0700 (Tue, 29 May 2007) | 2 lines Fix rst markup. ........ r55638 | neal.norwitz | 2007-05-29 00:51:39 -0700 (Tue, 29 May 2007) | 1 line Fix typo in doc ........ r55671 | neal.norwitz | 2007-05-29 21:53:41 -0700 (Tue, 29 May 2007) | 1 line Fix indentation (whitespace only). ........ r55676 | thomas.heller | 2007-05-29 23:58:30 -0700 (Tue, 29 May 2007) | 1 line Fix compiler warnings. ........ r55677 | thomas.heller | 2007-05-30 00:01:25 -0700 (Wed, 30 May 2007) | 2 lines Correct the name of a field in the WIN32_FIND_DATAA and WIN32_FIND_DATAW structures. Closes bug #1726026. ........ r55686 | brett.cannon | 2007-05-30 13:46:26 -0700 (Wed, 30 May 2007) | 2 lines Have MimeWriter raise a DeprecationWarning as per PEP 4 and its documentation. ........ r55690 | brett.cannon | 2007-05-30 14:48:58 -0700 (Wed, 30 May 2007) | 3 lines Have mimify raise a DeprecationWarning. The docs and PEP 4 have listed the module as deprecated for a while. ........ r55696 | brett.cannon | 2007-05-30 15:24:28 -0700 (Wed, 30 May 2007) | 2 lines Have md5 raise a DeprecationWarning as per PEP 4. ........ r55705 | neal.norwitz | 2007-05-30 21:14:22 -0700 (Wed, 30 May 2007) | 1 line Add some spaces in the example code. ........ r55716 | brett.cannon | 2007-05-31 12:20:00 -0700 (Thu, 31 May 2007) | 2 lines Have the sha module raise a DeprecationWarning as specified in PEP 4. ........ r55719 | brett.cannon | 2007-05-31 12:40:42 -0700 (Thu, 31 May 2007) | 2 lines Cause buildtools to raise a DeprecationWarning. ........ r55721 | brett.cannon | 2007-05-31 13:01:11 -0700 (Thu, 31 May 2007) | 2 lines Have cfmfile raise a DeprecationWarning as per PEP 4. ........ r55726 | neal.norwitz | 2007-05-31 21:56:47 -0700 (Thu, 31 May 2007) | 1 line Mail if there is an installation failure. ........ ................ r55730 | neal.norwitz | 2007-06-01 02:22:07 -0400 (Fri, 01 Jun 2007) | 2 lines Remove the code that was missed in rev 55303. ................ r55738 | neal.norwitz | 2007-06-01 22:10:43 -0400 (Fri, 01 Jun 2007) | 1 line Fix doc breakage ................ r55741 | neal.norwitz | 2007-06-02 03:41:58 -0400 (Sat, 02 Jun 2007) | 1 line Remove timing module (plus some remnants of other modules). ................ r55742 | neal.norwitz | 2007-06-02 03:51:44 -0400 (Sat, 02 Jun 2007) | 1 line Remove posixfile module (plus some remnants of other modules). ................ r55744 | neal.norwitz | 2007-06-02 13:18:56 -0400 (Sat, 02 Jun 2007) | 1 line Fix doc breakage. ................ r55745 | neal.norwitz | 2007-06-02 14:32:16 -0400 (Sat, 02 Jun 2007) | 1 line Make a whatsnew 3.0 template. ................ r55754 | neal.norwitz | 2007-06-04 02:24:18 -0400 (Mon, 04 Jun 2007) | 1 line SF #1730441, os._execvpe raises UnboundLocal due to new try/except semantics ................ r55755 | neal.norwitz | 2007-06-04 02:26:00 -0400 (Mon, 04 Jun 2007) | 1 line Get rid of extra whitespace ................ Modified: python/branches/cpy_merge/Demo/imputil/knee.py ============================================================================== --- python/branches/cpy_merge/Demo/imputil/knee.py (original) +++ python/branches/cpy_merge/Demo/imputil/knee.py Tue Jun 5 01:44:17 2007 @@ -106,8 +106,7 @@ return m -# Replacement for reload() -def reload_hook(module): +def reload(module): name = module.__name__ if '.' not in name: return import_module(name, name, None) @@ -119,8 +118,6 @@ # Save the original hooks original_import = __builtin__.__import__ -original_reload = __builtin__.reload # Now install our hooks __builtin__.__import__ = import_hook -__builtin__.reload = reload_hook Modified: python/branches/cpy_merge/Demo/pdist/cvslock.py ============================================================================== --- python/branches/cpy_merge/Demo/pdist/cvslock.py (original) +++ python/branches/cpy_merge/Demo/pdist/cvslock.py Tue Jun 5 01:44:17 2007 @@ -262,7 +262,6 @@ rl.unlock() finally: print [1] - sys.exc_traceback = None print [2] if rl: rl.unlock() Modified: python/branches/cpy_merge/Doc/Makefile ============================================================================== --- python/branches/cpy_merge/Doc/Makefile (original) +++ python/branches/cpy_merge/Doc/Makefile Tue Jun 5 01:44:17 2007 @@ -122,7 +122,7 @@ # The end of this should reflect the major/minor version numbers of # the release: -WHATSNEW=whatsnew26 +WHATSNEW=whatsnew30 # what's what MANDVIFILES= paper-$(PAPER)/api.dvi paper-$(PAPER)/ext.dvi \ Modified: python/branches/cpy_merge/Doc/Makefile.deps ============================================================================== --- python/branches/cpy_merge/Doc/Makefile.deps (original) +++ python/branches/cpy_merge/Doc/Makefile.deps Tue Jun 5 01:44:17 2007 @@ -171,7 +171,6 @@ lib/libgdbm.tex \ lib/libtermios.tex \ lib/libfcntl.tex \ - lib/libposixfile.tex \ lib/libsyslog.tex \ lib/liblogging.tex \ lib/libpdb.tex \ @@ -192,7 +191,6 @@ lib/libsgmllib.tex \ lib/librfc822.tex \ lib/libmimetools.tex \ - lib/libmimewriter.tex \ lib/libbinascii.tex \ lib/libmm.tex \ lib/libaudioop.tex \ @@ -235,7 +233,6 @@ lib/libzipfile.tex \ lib/libpprint.tex \ lib/libcode.tex \ - lib/libmimify.tex \ lib/libre.tex \ lib/libuserdict.tex \ lib/libdis.tex \ Modified: python/branches/cpy_merge/Doc/api/utilities.tex ============================================================================== --- python/branches/cpy_merge/Doc/api/utilities.tex (original) +++ python/branches/cpy_merge/Doc/api/utilities.tex Tue Jun 5 01:44:17 2007 @@ -140,10 +140,7 @@ \end{cfuncdesc} \begin{cfuncdesc}{PyObject*}{PyImport_ReloadModule}{PyObject *m} - Reload a module. This is best described by referring to the - built-in Python function \function{reload()}\bifuncindex{reload}, as - the standard \function{reload()} function calls this function - directly. Return a new reference to the reloaded module, or \NULL{} + Reload a module. Return a new reference to the reloaded module, or \NULL{} with an exception set on failure (the module still exists in this case). \end{cfuncdesc} Modified: python/branches/cpy_merge/Doc/ext/extending.tex ============================================================================== --- python/branches/cpy_merge/Doc/ext/extending.tex (original) +++ python/branches/cpy_merge/Doc/ext/extending.tex Tue Jun 5 01:44:17 2007 @@ -399,12 +399,7 @@ following a \cfunction{fork()} without an intervening \cfunction{exec()}) can create problems for some extension modules. Extension module authors should exercise caution when initializing -internal data structures. -Note also that the \function{reload()} function can be used with -extension modules, and will call the module initialization function -(\cfunction{initspam()} in the example), but will not load the module -again if it was loaded from a dynamically loadable object file -(\file{.so} on \UNIX, \file{.dll} on Windows).} +internal data structures.} A more substantial example module is included in the Python source distribution as \file{Modules/xxmodule.c}. This file may be used as a Modified: python/branches/cpy_merge/Doc/howto/functional.rst ============================================================================== --- python/branches/cpy_merge/Doc/howto/functional.rst (original) +++ python/branches/cpy_merge/Doc/howto/functional.rst Tue Jun 5 01:44:17 2007 @@ -980,7 +980,7 @@ that's a slice of the iterator. With a single ``stop`` argument, it will return the first ``stop`` elements. If you supply a starting index, you'll get ``stop-start`` -elements, and if you supply a value for ``step`, elements will be +elements, and if you supply a value for ``step``, elements will be skipped accordingly. Unlike Python's string and list slicing, you can't use negative values for ``start``, ``stop``, or ``step``. Modified: python/branches/cpy_merge/Doc/lib/lib.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/lib.tex (original) +++ python/branches/cpy_merge/Doc/lib/lib.tex Tue Jun 5 01:44:17 2007 @@ -146,8 +146,6 @@ \input{libmhlib} \input{libmimetools} \input{libmimetypes} -\input{libmimewriter} -\input{libmimify} \input{libmultifile} \input{librfc822} @@ -265,7 +263,6 @@ \input{libpty} \input{libfcntl} \input{libpipes} -\input{libposixfile} \input{libresource} \input{libnis} \input{libsyslog} Modified: python/branches/cpy_merge/Doc/lib/libcodecs.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libcodecs.tex (original) +++ python/branches/cpy_merge/Doc/lib/libcodecs.tex Tue Jun 5 01:44:17 2007 @@ -237,7 +237,7 @@ \begin{funcdesc}{iterdecode}{iterable, encoding\optional{, errors}} Uses an incremental decoder to iteratively decode the input provided by \var{iterable}. This function is a generator. \var{errors} (as well as -any other keyword argument) is passed through to the incremental encoder. +any other keyword argument) is passed through to the incremental decoder. \versionadded{2.5} \end{funcdesc} Modified: python/branches/cpy_merge/Doc/lib/libfuncs.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libfuncs.tex (original) +++ python/branches/cpy_merge/Doc/lib/libfuncs.tex Tue Jun 5 01:44:17 2007 @@ -890,82 +890,6 @@ \end{verbatim} \end{funcdesc} -\begin{funcdesc}{reload}{module} - Reload a previously imported \var{module}. The - argument must be a module object, so it must have been successfully - imported before. This is useful if you have edited the module - source file using an external editor and want to try out the new - version without leaving the Python interpreter. The return value is - the module object (the same as the \var{module} argument). - - When \code{reload(module)} is executed: - -\begin{itemize} - - \item Python modules' code is recompiled and the module-level code - reexecuted, defining a new set of objects which are bound to names in - the module's dictionary. The \code{init} function of extension - modules is not called a second time. - - \item As with all other objects in Python the old objects are only - reclaimed after their reference counts drop to zero. - - \item The names in the module namespace are updated to point to - any new or changed objects. - - \item Other references to the old objects (such as names external - to the module) are not rebound to refer to the new objects and - must be updated in each namespace where they occur if that is - desired. - -\end{itemize} - - There are a number of other caveats: - - If a module is syntactically correct but its initialization fails, - the first \keyword{import} statement for it does not bind its name - locally, but does store a (partially initialized) module object in - \code{sys.modules}. To reload the module you must first - \keyword{import} it again (this will bind the name to the partially - initialized module object) before you can \function{reload()} it. - - When a module is reloaded, its dictionary (containing the module's - global variables) is retained. Redefinitions of names will override - the old definitions, so this is generally not a problem. If the new - version of a module does not define a name that was defined by the - old version, the old definition remains. This feature can be used - to the module's advantage if it maintains a global table or cache of - objects --- with a \keyword{try} statement it can test for the - table's presence and skip its initialization if desired: - -\begin{verbatim} -try: - cache -except NameError: - cache = {} -\end{verbatim} - - - It is legal though generally not very useful to reload built-in or - dynamically loaded modules, except for \refmodule{sys}, - \refmodule[main]{__main__} and \refmodule[builtin]{__builtin__}. In - many cases, however, extension modules are not designed to be - initialized more than once, and may fail in arbitrary ways when - reloaded. - - If a module imports objects from another module using \keyword{from} - \ldots{} \keyword{import} \ldots{}, calling \function{reload()} for - the other module does not redefine the objects imported from it --- - one way around this is to re-execute the \keyword{from} statement, - another is to use \keyword{import} and qualified names - (\var{module}.\var{name}) instead. - - If a module instantiates instances of a class, reloading the module - that defines the class does not affect the method definitions of the - instances --- they continue to use the old class definition. The - same is true for derived classes. -\end{funcdesc} - \begin{funcdesc}{repr}{object} Return a string containing a printable representation of an object. This is the same value yielded by conversions (reverse quotes). Modified: python/branches/cpy_merge/Doc/lib/libimp.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libimp.tex (original) +++ python/branches/cpy_merge/Doc/lib/libimp.tex Tue Jun 5 01:44:17 2007 @@ -69,8 +69,7 @@ Load a module that was previously found by \function{find_module()} (or by an otherwise conducted search yielding compatible results). This function does more than importing the module: if the module was -already imported, it is equivalent to a -\function{reload()}\bifuncindex{reload}! The \var{name} argument +already imported, it will reload the module! The \var{name} argument indicates the full module name (including the package name, if this is a submodule of a package). The \var{file} argument is an open file, and \var{filename} is the corresponding file name; these can be @@ -286,7 +285,7 @@ \end{verbatim} A more complete example that implements hierarchical module names and -includes a \function{reload()}\bifuncindex{reload} function can be +includes a \function{reload()} function can be found in the module \module{knee}\refmodindex{knee}. The \module{knee} module can be found in \file{Demo/imputil/} in the Python source distribution. Modified: python/branches/cpy_merge/Doc/lib/libitertools.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libitertools.tex (original) +++ python/branches/cpy_merge/Doc/lib/libitertools.tex Tue Jun 5 01:44:17 2007 @@ -138,6 +138,13 @@ identity function and returns the element unchanged. Generally, the iterable needs to already be sorted on the same key function. + The operation of \function{groupby()} is similar to the \code{uniq} filter + in \UNIX{}. It generates a break or new group every time the value + of the key function changes (which is why it is usually necessary + to have sorted the data using the same key function). That behavior + differs from SQL's GROUP BY which aggregates common elements regardless + of their input order. + The returned group is itself an iterator that shares the underlying iterable with \function{groupby()}. Because the source is shared, when the \function{groupby} object is advanced, the previous group is no @@ -147,6 +154,7 @@ \begin{verbatim} groups = [] uniquekeys = [] + data = sorted(data, key=keyfunc) for k, g in groupby(data, keyfunc): groups.append(list(g)) # Store group iterator as a list uniquekeys.append(k) Modified: python/branches/cpy_merge/Doc/lib/liblogging.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/liblogging.tex (original) +++ python/branches/cpy_merge/Doc/lib/liblogging.tex Tue Jun 5 01:44:17 2007 @@ -1208,8 +1208,11 @@ communicate with a remote \UNIX{} machine whose address is given by \var{address} in the form of a \code{(\var{host}, \var{port})} tuple. If \var{address} is not specified, \code{('localhost', 514)} is -used. The address is used to open a UDP socket. If \var{facility} is -not specified, \constant{LOG_USER} is used. +used. The address is used to open a UDP socket. An alternative to providing +a \code{(\var{host}, \var{port})} tuple is providing an address as a string, +for example "/dev/log". In this case, a Unix domain socket is used to send +the message to the syslog. If \var{facility} is not specified, +\constant{LOG_USER} is used. \end{classdesc} \begin{methoddesc}{close}{} Deleted: /python/branches/cpy_merge/Doc/lib/libmimewriter.tex ============================================================================== --- /python/branches/cpy_merge/Doc/lib/libmimewriter.tex Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,80 +0,0 @@ -\section{\module{MimeWriter} --- - Generic MIME file writer} - -\declaremodule{standard}{MimeWriter} - -\modulesynopsis{Generic MIME file writer.} -\sectionauthor{Christopher G. Petrilli}{petrilli at amber.org} - -\deprecated{2.3}{The \refmodule{email} package should be used in - preference to the \module{MimeWriter} module. This - module is present only to maintain backward - compatibility.} - -This module defines the class \class{MimeWriter}. The -\class{MimeWriter} class implements a basic formatter for creating -MIME multi-part files. It doesn't seek around the output file nor -does it use large amounts of buffer space. You must write the parts -out in the order that they should occur in the final -file. \class{MimeWriter} does buffer the headers you add, allowing you -to rearrange their order. - -\begin{classdesc}{MimeWriter}{fp} -Return a new instance of the \class{MimeWriter} class. The only -argument passed, \var{fp}, is a file object to be used for -writing. Note that a \class{StringIO} object could also be used. -\end{classdesc} - - -\subsection{MimeWriter Objects \label{MimeWriter-objects}} - - -\class{MimeWriter} instances have the following methods: - -\begin{methoddesc}[MimeWriter]{addheader}{key, value\optional{, prefix}} -Add a header line to the MIME message. The \var{key} is the name of -the header, where the \var{value} obviously provides the value of the -header. The optional argument \var{prefix} determines where the header -is inserted; \samp{0} means append at the end, \samp{1} is insert at -the start. The default is to append. -\end{methoddesc} - -\begin{methoddesc}[MimeWriter]{flushheaders}{} -Causes all headers accumulated so far to be written out (and -forgotten). This is useful if you don't need a body part at all, -e.g.\ for a subpart of type \mimetype{message/rfc822} that's (mis)used -to store some header-like information. -\end{methoddesc} - -\begin{methoddesc}[MimeWriter]{startbody}{ctype\optional{, plist\optional{, prefix}}} -Returns a file-like object which can be used to write to the -body of the message. The content-type is set to the provided -\var{ctype}, and the optional parameter \var{plist} provides -additional parameters for the content-type declaration. \var{prefix} -functions as in \method{addheader()} except that the default is to -insert at the start. -\end{methoddesc} - -\begin{methoddesc}[MimeWriter]{startmultipartbody}{subtype\optional{, - boundary\optional{, plist\optional{, prefix}}}} -Returns a file-like object which can be used to write to the -body of the message. Additionally, this method initializes the -multi-part code, where \var{subtype} provides the multipart subtype, -\var{boundary} may provide a user-defined boundary specification, and -\var{plist} provides optional parameters for the subtype. -\var{prefix} functions as in \method{startbody()}. Subparts should be -created using \method{nextpart()}. -\end{methoddesc} - -\begin{methoddesc}[MimeWriter]{nextpart}{} -Returns a new instance of \class{MimeWriter} which represents an -individual part in a multipart message. This may be used to write the -part as well as used for creating recursively complex multipart -messages. The message must first be initialized with -\method{startmultipartbody()} before using \method{nextpart()}. -\end{methoddesc} - -\begin{methoddesc}[MimeWriter]{lastpart}{} -This is used to designate the last part of a multipart message, and -should \emph{always} be used when writing multipart messages. -\end{methoddesc} Deleted: /python/branches/cpy_merge/Doc/lib/libmimify.tex ============================================================================== --- /python/branches/cpy_merge/Doc/lib/libmimify.tex Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,94 +0,0 @@ -\section{\module{mimify} --- - MIME processing of mail messages} - -\declaremodule{standard}{mimify} -\modulesynopsis{Mimification and unmimification of mail messages.} - -\deprecated{2.3}{The \refmodule{email} package should be used in - preference to the \module{mimify} module. This - module is present only to maintain backward - compatibility.} - -The \module{mimify} module defines two functions to convert mail messages to -and from MIME format. The mail message can be either a simple message -or a so-called multipart message. Each part is treated separately. -Mimifying (a part of) a message entails encoding the message as -quoted-printable if it contains any characters that cannot be -represented using 7-bit \ASCII. Unmimifying (a part of) a message -entails undoing the quoted-printable encoding. Mimify and unmimify -are especially useful when a message has to be edited before being -sent. Typical use would be: - -\begin{verbatim} -unmimify message -edit message -mimify message -send message -\end{verbatim} - -The modules defines the following user-callable functions and -user-settable variables: - -\begin{funcdesc}{mimify}{infile, outfile} -Copy the message in \var{infile} to \var{outfile}, converting parts to -quoted-printable and adding MIME mail headers when necessary. -\var{infile} and \var{outfile} can be file objects (actually, any -object that has a \method{readline()} method (for \var{infile}) or a -\method{write()} method (for \var{outfile})) or strings naming the files. -If \var{infile} and \var{outfile} are both strings, they may have the -same value. -\end{funcdesc} - -\begin{funcdesc}{unmimify}{infile, outfile\optional{, decode_base64}} -Copy the message in \var{infile} to \var{outfile}, decoding all -quoted-printable parts. \var{infile} and \var{outfile} can be file -objects (actually, any object that has a \method{readline()} method (for -\var{infile}) or a \method{write()} method (for \var{outfile})) or strings -naming the files. If \var{infile} and \var{outfile} are both strings, -they may have the same value. -If the \var{decode_base64} argument is provided and tests true, any -parts that are coded in the base64 encoding are decoded as well. -\end{funcdesc} - -\begin{funcdesc}{mime_decode_header}{line} -Return a decoded version of the encoded header line in \var{line}. -This only supports the ISO 8859-1 charset (Latin-1). -\end{funcdesc} - -\begin{funcdesc}{mime_encode_header}{line} -Return a MIME-encoded version of the header line in \var{line}. -\end{funcdesc} - -\begin{datadesc}{MAXLEN} -By default, a part will be encoded as quoted-printable when it -contains any non-\ASCII{} characters (characters with the 8th bit -set), or if there are any lines longer than \constant{MAXLEN} characters -(default value 200). -\end{datadesc} - -\begin{datadesc}{CHARSET} -When not specified in the mail headers, a character set must be filled -in. The string used is stored in \constant{CHARSET}, and the default -value is ISO-8859-1 (also known as Latin1 (latin-one)). -\end{datadesc} - -This module can also be used from the command line. Usage is as -follows: -\begin{verbatim} -mimify.py -e [-l length] [infile [outfile]] -mimify.py -d [-b] [infile [outfile]] -\end{verbatim} -to encode (mimify) and decode (unmimify) respectively. \var{infile} -defaults to standard input, \var{outfile} defaults to standard output. -The same file can be specified for input and output. - -If the \strong{-l} option is given when encoding, if there are any lines -longer than the specified \var{length}, the containing part will be -encoded. - -If the \strong{-b} option is given when decoding, any base64 parts will -be decoded as well. - -\begin{seealso} - \seemodule{quopri}{Encode and decode MIME quoted-printable files.} -\end{seealso} Modified: python/branches/cpy_merge/Doc/lib/libpickle.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libpickle.tex (original) +++ python/branches/cpy_merge/Doc/lib/libpickle.tex Tue Jun 5 01:44:17 2007 @@ -799,7 +799,7 @@ del odict['fh'] # remove filehandle entry return odict - def __setstate__(self,dict): + def __setstate__(self, dict): fh = open(dict['file']) # reopen file count = dict['lineno'] # read from file... while count: # until line count is restored @@ -820,7 +820,7 @@ ... obj.readline() '7: class TextReader:' >>> import pickle ->>> pickle.dump(obj,open('save.p','w')) +>>> pickle.dump(obj,open('save.p', 'wb')) \end{verbatim} If you want to see that \refmodule{pickle} works across Python @@ -829,7 +829,7 @@ \begin{verbatim} >>> import pickle ->>> reader = pickle.load(open('save.p')) +>>> reader = pickle.load(open('save.p', 'rb')) >>> reader.readline() '8: "Print and number lines in a text file."' \end{verbatim} Deleted: /python/branches/cpy_merge/Doc/lib/libposixfile.tex ============================================================================== --- /python/branches/cpy_merge/Doc/lib/libposixfile.tex Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,174 +0,0 @@ -% Manual text and implementation by Jaap Vermeulen -\section{\module{posixfile} --- - File-like objects with locking support} - -\declaremodule{builtin}{posixfile} - \platform{Unix} -\modulesynopsis{A file-like object with support for locking.} -\moduleauthor{Jaap Vermeulen}{} -\sectionauthor{Jaap Vermeulen}{} - - -\indexii{\POSIX}{file object} - -\deprecated{1.5}{The locking operation that this module provides is -done better and more portably by the -\function{\refmodule{fcntl}.lockf()} call. -\withsubitem{(in module fcntl)}{\ttindex{lockf()}}} - -This module implements some additional functionality over the built-in -file objects. In particular, it implements file locking, control over -the file flags, and an easy interface to duplicate the file object. -The module defines a new file object, the posixfile object. It -has all the standard file object methods and adds the methods -described below. This module only works for certain flavors of -\UNIX, since it uses \function{fcntl.fcntl()} for file locking.% -\withsubitem{(in module fcntl)}{\ttindex{fcntl()}} - -To instantiate a posixfile object, use the \function{open()} function -in the \module{posixfile} module. The resulting object looks and -feels roughly the same as a standard file object. - -The \module{posixfile} module defines the following constants: - - -\begin{datadesc}{SEEK_SET} -Offset is calculated from the start of the file. -\end{datadesc} - -\begin{datadesc}{SEEK_CUR} -Offset is calculated from the current position in the file. -\end{datadesc} - -\begin{datadesc}{SEEK_END} -Offset is calculated from the end of the file. -\end{datadesc} - -The \module{posixfile} module defines the following functions: - - -\begin{funcdesc}{open}{filename\optional{, mode\optional{, bufsize}}} - Create a new posixfile object with the given filename and mode. The - \var{filename}, \var{mode} and \var{bufsize} arguments are - interpreted the same way as by the built-in \function{open()} - function. -\end{funcdesc} - -\begin{funcdesc}{fileopen}{fileobject} - Create a new posixfile object with the given standard file object. - The resulting object has the same filename and mode as the original - file object. -\end{funcdesc} - -The posixfile object defines the following additional methods: - -\begin{methoddesc}[posixfile]{lock}{fmt, \optional{len\optional{, start\optional{, whence}}}} - Lock the specified section of the file that the file object is - referring to. The format is explained - below in a table. The \var{len} argument specifies the length of the - section that should be locked. The default is \code{0}. \var{start} - specifies the starting offset of the section, where the default is - \code{0}. The \var{whence} argument specifies where the offset is - relative to. It accepts one of the constants \constant{SEEK_SET}, - \constant{SEEK_CUR} or \constant{SEEK_END}. The default is - \constant{SEEK_SET}. For more information about the arguments refer - to the \manpage{fcntl}{2} manual page on your system. -\end{methoddesc} - -\begin{methoddesc}[posixfile]{flags}{\optional{flags}} - Set the specified flags for the file that the file object is referring - to. The new flags are ORed with the old flags, unless specified - otherwise. The format is explained below in a table. Without - the \var{flags} argument - a string indicating the current flags is returned (this is - the same as the \samp{?} modifier). For more information about the - flags refer to the \manpage{fcntl}{2} manual page on your system. -\end{methoddesc} - -\begin{methoddesc}[posixfile]{dup}{} - Duplicate the file object and the underlying file pointer and file - descriptor. The resulting object behaves as if it were newly - opened. -\end{methoddesc} - -\begin{methoddesc}[posixfile]{dup2}{fd} - Duplicate the file object and the underlying file pointer and file - descriptor. The new object will have the given file descriptor. - Otherwise the resulting object behaves as if it were newly opened. -\end{methoddesc} - -\begin{methoddesc}[posixfile]{file}{} - Return the standard file object that the posixfile object is based - on. This is sometimes necessary for functions that insist on a - standard file object. -\end{methoddesc} - -All methods raise \exception{IOError} when the request fails. - -Format characters for the \method{lock()} method have the following -meaning: - -\begin{tableii}{c|l}{samp}{Format}{Meaning} - \lineii{u}{unlock the specified region} - \lineii{r}{request a read lock for the specified section} - \lineii{w}{request a write lock for the specified section} -\end{tableii} - -In addition the following modifiers can be added to the format: - -\begin{tableiii}{c|l|c}{samp}{Modifier}{Meaning}{Notes} - \lineiii{|}{wait until the lock has been granted}{} - \lineiii{?}{return the first lock conflicting with the requested lock, or - \code{None} if there is no conflict.}{(1)} -\end{tableiii} - -\noindent -Note: - -\begin{description} -\item[(1)] The lock returned is in the format \code{(\var{mode}, \var{len}, -\var{start}, \var{whence}, \var{pid})} where \var{mode} is a character -representing the type of lock ('r' or 'w'). This modifier prevents a -request from being granted; it is for query purposes only. -\end{description} - -Format characters for the \method{flags()} method have the following -meanings: - -\begin{tableii}{c|l}{samp}{Format}{Meaning} - \lineii{a}{append only flag} - \lineii{c}{close on exec flag} - \lineii{n}{no delay flag (also called non-blocking flag)} - \lineii{s}{synchronization flag} -\end{tableii} - -In addition the following modifiers can be added to the format: - -\begin{tableiii}{c|l|c}{samp}{Modifier}{Meaning}{Notes} - \lineiii{!}{turn the specified flags 'off', instead of the default 'on'}{(1)} - \lineiii{=}{replace the flags, instead of the default 'OR' operation}{(1)} - \lineiii{?}{return a string in which the characters represent the flags that - are set.}{(2)} -\end{tableiii} - -\noindent -Notes: - -\begin{description} -\item[(1)] The \samp{!} and \samp{=} modifiers are mutually exclusive. - -\item[(2)] This string represents the flags after they may have been altered -by the same call. -\end{description} - -Examples: - -\begin{verbatim} -import posixfile - -file = posixfile.open('/tmp/test', 'w') -file.lock('w|') -... -file.lock('u') -file.close() -\end{verbatim} Modified: python/branches/cpy_merge/Doc/lib/libshlex.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libshlex.tex (original) +++ python/branches/cpy_merge/Doc/lib/libshlex.tex Tue Jun 5 01:44:17 2007 @@ -19,13 +19,15 @@ The \module{shlex} module defines the following functions: -\begin{funcdesc}{split}{s\optional{, comments}} +\begin{funcdesc}{split}{s\optional{, comments\optional{, posix}}} Split the string \var{s} using shell-like syntax. If \var{comments} is \constant{False} (the default), the parsing of comments in the given string will be disabled (setting the \member{commenters} member of the \class{shlex} instance to the empty string). This function operates -in \POSIX{} mode. +in \POSIX{} mode by default, but uses non-\POSIX{} mode if the +\var{posix} argument is false. \versionadded{2.3} +\versionchanged[Added the \var{posix} parameter]{2.6} \end{funcdesc} The \module{shlex} module defines the following class: Modified: python/branches/cpy_merge/Doc/lib/libsubprocess.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libsubprocess.tex (original) +++ python/branches/cpy_merge/Doc/lib/libsubprocess.tex Tue Jun 5 01:44:17 2007 @@ -87,7 +87,10 @@ If \var{close_fds} is true, all file descriptors except \constant{0}, \constant{1} and \constant{2} will be closed before the child process is -executed. (\UNIX{} only) +executed. (\UNIX{} only). Or, on Windows, if \var{close_fds} is true +then no handles will be inherited by the child process. Note that on +Windows, you cannot set \var{close_fds} to true and also redirect the +standard handles by setting \var{stdin}, \var{stdout} or \var{stderr}. If \var{shell} is \constant{True}, the specified command will be executed through the shell. Modified: python/branches/cpy_merge/Doc/lib/libsys.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libsys.tex (original) +++ python/branches/cpy_merge/Doc/lib/libsys.tex Tue Jun 5 01:44:17 2007 @@ -132,11 +132,6 @@ encapsulates the call stack at the point where the exception originally occurred. \obindex{traceback} - If \function{exc_clear()} is called, this function will return three - \code{None} values until either another exception is raised in the - current thread or the execution stack returns to a frame where - another exception is being handled. - \warning{Assigning the \var{traceback} return value to a local variable in a function that is handling an exception will cause a circular reference. This will prevent anything referenced @@ -153,32 +148,6 @@ efficient to avoid creating cycles.} \end{funcdesc} -\begin{funcdesc}{exc_clear}{} - This function clears all information relating to the current or last - exception that occurred in the current thread. After calling this - function, \function{exc_info()} will return three \code{None} values until - another exception is raised in the current thread or the execution stack - returns to a frame where another exception is being handled. - - This function is only needed in only a few obscure situations. These - include logging and error handling systems that report information on the - last or current exception. This function can also be used to try to free - resources and trigger object finalization, though no guarantee is made as - to what objects will be freed, if any. -\versionadded{2.3} -\end{funcdesc} - -\begin{datadesc}{exc_type} -\dataline{exc_value} -\dataline{exc_traceback} -\deprecated {1.5} - {Use \function{exc_info()} instead.} - Since they are global variables, they are not specific to the - current thread, so their use is not safe in a multi-threaded - program. When no exception is being handled, \code{exc_type} is set - to \code{None} and the other two are undefined. -\end{datadesc} - \begin{datadesc}{exec_prefix} A string giving the site-specific directory prefix where the platform-dependent Python files are installed; by default, this is @@ -377,10 +346,7 @@ \begin{datadesc}{modules} This is a dictionary that maps module names to modules which have already been loaded. This can be manipulated to force reloading of - modules and other tricks. Note that removing a module from this - dictionary is \emph{not} the same as calling - \function{reload()}\bifuncindex{reload} on the corresponding module - object. + modules and other tricks. \end{datadesc} \begin{datadesc}{path} Modified: python/branches/cpy_merge/Doc/lib/libtarfile.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libtarfile.tex (original) +++ python/branches/cpy_merge/Doc/lib/libtarfile.tex Tue Jun 5 01:44:17 2007 @@ -133,24 +133,20 @@ \versionadded{2.6} \end{excdesc} +Each of the following constants defines a tar archive format that the +\module{tarfile} module is able to create. See section \ref{tar-formats} for +details. + \begin{datadesc}{USTAR_FORMAT} - \POSIX{}.1-1988 (ustar) format. It supports filenames up to a length of - at best 256 characters and linknames up to 100 characters. The maximum - file size is 8 gigabytes. This is an old and limited but widely - supported format. + \POSIX{}.1-1988 (ustar) format. \end{datadesc} \begin{datadesc}{GNU_FORMAT} - GNU tar format. It supports arbitrarily long filenames and linknames and - files bigger than 8 gigabytes. It is the defacto standard on GNU/Linux - systems. + GNU tar format. \end{datadesc} \begin{datadesc}{PAX_FORMAT} - \POSIX{}.1-2001 (pax) format. It is the most flexible format with - virtually no limits. It supports long filenames and linknames, large files - and stores pathnames in a portable way. However, not all tar - implementations today are able to handle pax archives properly. + \POSIX{}.1-2001 (pax) format. \end{datadesc} \begin{datadesc}{DEFAULT_FORMAT} @@ -175,15 +171,15 @@ The \class{TarFile} object provides an interface to a tar archive. A tar archive is a sequence of blocks. An archive member (a stored file) is made up -of a header block followed by data blocks. It is possible, to store a file in a +of a header block followed by data blocks. It is possible to store a file in a tar archive several times. Each archive member is represented by a \class{TarInfo} object, see \citetitle{TarInfo Objects} (section \ref{tarinfo-objects}) for details. \begin{classdesc}{TarFile}{name=None, mode='r', fileobj=None, format=DEFAULT_FORMAT, tarinfo=TarInfo, dereference=False, - ignore_zeros=False, encoding=None, pax_headers=None, debug=0, - errorlevel=0} + ignore_zeros=False, encoding=None, errors=None, pax_headers=None, + debug=0, errorlevel=0} All following arguments are optional and can be accessed as instance attributes as well. @@ -231,18 +227,14 @@ If \code{2}, all \emph{non-fatal} errors are raised as \exception{TarError} exceptions as well. - The \var{encoding} argument defines the local character encoding. It - defaults to the value from \function{sys.getfilesystemencoding()} or if - that is \code{None} to \code{"ascii"}. \var{encoding} is used only in - connection with the pax format which stores text data in \emph{UTF-8}. If - it is not set correctly, character conversion will fail with a - \exception{UnicodeError}. + The \var{encoding} and \var{errors} arguments control the way strings are + converted to unicode objects and vice versa. The default settings will work + for most users. See section \ref{tar-unicode} for in-depth information. \versionadded{2.6} - The \var{pax_headers} argument must be a dictionary whose elements are - either unicode objects, numbers or strings that can be decoded to unicode - using \var{encoding}. This information will be added to the archive as a - pax global header. + The \var{pax_headers} argument is an optional dictionary of unicode strings + which will be added as a pax global header if \var{format} is + \constant{PAX_FORMAT}. \versionadded{2.6} \end{classdesc} @@ -287,7 +279,7 @@ Extract all members from the archive to the current working directory or directory \var{path}. If optional \var{members} is given, it must be a subset of the list returned by \method{getmembers()}. - Directory informations like owner, modification time and permissions are + Directory information like owner, modification time and permissions are set after all members have been extracted. This is done to work around two problems: A directory's modification time is reset each time a file is created in it. And, if a directory's permissions do not allow writing, @@ -365,6 +357,11 @@ \deprecated{2.6}{Use the \member{format} attribute instead.} \end{memberdesc} +\begin{memberdesc}{pax_headers} + A dictionary containing key-value pairs of pax global headers. + \versionadded{2.6} +\end{memberdesc} + %----------------- % TarInfo Objects %----------------- @@ -384,8 +381,8 @@ Create a \class{TarInfo} object. \end{classdesc} -\begin{methoddesc}{frombuf}{} - Create and return a \class{TarInfo} object from a string buffer. +\begin{methoddesc}{frombuf}{buf} + Create and return a \class{TarInfo} object from string buffer \var{buf}. \versionadded[Raises \exception{HeaderError} if the buffer is invalid.]{2.6} \end{methoddesc} @@ -396,10 +393,11 @@ \versionadded{2.6} \end{methoddesc} -\begin{methoddesc}{tobuf}{\optional{format}} - Create a string buffer from a \class{TarInfo} object. See - \class{TarFile}'s \member{format} argument for information. - \versionchanged[The \var{format} parameter]{2.6} +\begin{methoddesc}{tobuf}{\optional{format\optional{, encoding + \optional{, errors}}}} + Create a string buffer from a \class{TarInfo} object. For information + on the arguments see the constructor of the \class{TarFile} class. + \versionchanged[The arguments were added]{2.6} \end{methoddesc} A \code{TarInfo} object has the following public data attributes: @@ -452,6 +450,12 @@ Group name. \end{memberdesc} +\begin{memberdesc}{pax_headers} + A dictionary containing key-value pairs of an associated pax + extended header. + \versionadded{2.6} +\end{memberdesc} + A \class{TarInfo} object also provides some convenient query methods: \begin{methoddesc}{isfile}{} @@ -554,3 +558,103 @@ tar.extract(tarinfo) tar.close() \end{verbatim} + +%------------ +% Tar format +%------------ + +\subsection{Supported tar formats \label{tar-formats}} + +There are three tar formats that can be created with the \module{tarfile} +module: + +\begin{itemize} + +\item +The \POSIX{}.1-1988 ustar format (\constant{USTAR_FORMAT}). It supports +filenames up to a length of at best 256 characters and linknames up to 100 +characters. The maximum file size is 8 gigabytes. This is an old and limited +but widely supported format. + +\item +The GNU tar format (\constant{GNU_FORMAT}). It supports long filenames and +linknames, files bigger than 8 gigabytes and sparse files. It is the de facto +standard on GNU/Linux systems. \module{tarfile} fully supports the GNU tar +extensions for long names, sparse file support is read-only. + +\item +The \POSIX{}.1-2001 pax format (\constant{PAX_FORMAT}). It is the most +flexible format with virtually no limits. It supports long filenames and +linknames, large files and stores pathnames in a portable way. However, not +all tar implementations today are able to handle pax archives properly. + +The \emph{pax} format is an extension to the existing \emph{ustar} format. It +uses extra headers for information that cannot be stored otherwise. There are +two flavours of pax headers: Extended headers only affect the subsequent file +header, global headers are valid for the complete archive and affect all +following files. All the data in a pax header is encoded in \emph{UTF-8} for +portability reasons. + +\end{itemize} + +There are some more variants of the tar format which can be read, but not +created: + +\begin{itemize} + +\item +The ancient V7 format. This is the first tar format from \UNIX{} Seventh +Edition, storing only regular files and directories. Names must not be longer +than 100 characters, there is no user/group name information. Some archives +have miscalculated header checksums in case of fields with non-\ASCII{} +characters. + +\item +The SunOS tar extended format. This format is a variant of the \POSIX{}.1-2001 +pax format, but is not compatible. + +\end{itemize} + +%---------------- +% Unicode issues +%---------------- + +\subsection{Unicode issues \label{tar-unicode}} + +The tar format was originally conceived to make backups on tape drives with the +main focus on preserving file system information. Nowadays tar archives are +commonly used for file distribution and exchanging archives over networks. One +problem of the original format (that all other formats are merely variants of) +is that there is no concept of supporting different character encodings. +For example, an ordinary tar archive created on a \emph{UTF-8} system cannot be +read correctly on a \emph{Latin-1} system if it contains non-\ASCII{} +characters. Names (i.e. filenames, linknames, user/group names) containing +these characters will appear damaged. Unfortunately, there is no way to +autodetect the encoding of an archive. + +The pax format was designed to solve this problem. It stores non-\ASCII{} names +using the universal character encoding \emph{UTF-8}. When a pax archive is +read, these \emph{UTF-8} names are converted to the encoding of the local +file system. + +The details of unicode conversion are controlled by the \var{encoding} and +\var{errors} keyword arguments of the \class{TarFile} class. + +The default value for \var{encoding} is the local character encoding. It is +deduced from \function{sys.getfilesystemencoding()} and +\function{sys.getdefaultencoding()}. In read mode, \var{encoding} is used +exclusively to convert unicode names from a pax archive to strings in the local +character encoding. In write mode, the use of \var{encoding} depends on the +chosen archive format. In case of \constant{PAX_FORMAT}, input names that +contain non-\ASCII{} characters need to be decoded before being stored as +\emph{UTF-8} strings. The other formats do not make use of \var{encoding} +unless unicode objects are used as input names. These are converted to +8-bit character strings before they are added to the archive. + +The \var{errors} argument defines how characters are treated that cannot be +converted to or from \var{encoding}. Possible values are listed in section +\ref{codec-base-classes}. In read mode, there is an additional scheme +\code{'utf-8'} which means that bad characters are replaced by their +\emph{UTF-8} representation. This is the default scheme. In write mode the +default value for \var{errors} is \code{'strict'} to ensure that name +information is not altered unnoticed. Modified: python/branches/cpy_merge/Doc/lib/libtypes.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libtypes.tex (original) +++ python/branches/cpy_merge/Doc/lib/libtypes.tex Tue Jun 5 01:44:17 2007 @@ -163,7 +163,7 @@ \begin{datadesc}{TracebackType} The type of traceback objects such as found in -\code{sys.exc_traceback}. +\code{sys.exc_info()[2]}. \end{datadesc} \begin{datadesc}{FrameType} Modified: python/branches/cpy_merge/Doc/lib/libundoc.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libundoc.tex (original) +++ python/branches/cpy_merge/Doc/lib/libundoc.tex Tue Jun 5 01:44:17 2007 @@ -88,7 +88,6 @@ % XXX need Windows instructions! \begin{description} -\item[\module{timing}] ---- Measure time intervals to high resolution (use \function{time.clock()} - instead). +\item +--- This section should be empty for Python 3.0. \end{description} Modified: python/branches/cpy_merge/Doc/lib/libzipimport.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libzipimport.tex (original) +++ python/branches/cpy_merge/Doc/lib/libzipimport.tex Tue Jun 5 01:44:17 2007 @@ -29,11 +29,6 @@ if a ZIP archive doesn't contain \file{.pyc} files, importing may be rather slow. -Using the built-in \function{reload()} function will -fail if called on a module loaded from a ZIP archive; it is unlikely that -\function{reload()} would be needed, since this would imply that the ZIP -has been altered during runtime. - The available attributes of this module are: \begin{excdesc}{ZipImportError} Modified: python/branches/cpy_merge/Doc/mac/undoc.tex ============================================================================== --- python/branches/cpy_merge/Doc/mac/undoc.tex (original) +++ python/branches/cpy_merge/Doc/mac/undoc.tex Tue Jun 5 01:44:17 2007 @@ -23,18 +23,6 @@ \deprecated{2.4}{} -\section{\module{cfmfile} --- Code Fragment Resource module} -\declaremodule{standard}{cfmfile} - \platform{Mac} -\modulesynopsis{Code Fragment Resource module.} - -\module{cfmfile} is a module that understands Code Fragments and the -accompanying ``cfrg'' resources. It can parse them and merge them, and is -used by BuildApplication to combine all plugin modules to a single -executable. - -\deprecated{2.4}{} - \section{\module{icopen} --- Internet Config replacement for \method{open()}} \declaremodule{standard}{icopen} \platform{Mac} Modified: python/branches/cpy_merge/Doc/ref/ref3.tex ============================================================================== --- python/branches/cpy_merge/Doc/ref/ref3.tex (original) +++ python/branches/cpy_merge/Doc/ref/ref3.tex Tue Jun 5 01:44:17 2007 @@ -977,10 +977,8 @@ traceback. When an exception handler is entered, the stack trace is made available to the program. (See section~\ref{try}, ``The \code{try} statement.'') -It is accessible as \code{sys.exc_traceback}, and also as the third -item of the tuple returned by \code{sys.exc_info()}. The latter is -the preferred interface, since it works correctly when the program is -using multiple threads. +It is accessible as the third +item of the tuple returned by \code{sys.exc_info()}. When the program contains no suitable handler, the stack trace is written (nicely formatted) to the standard error stream; if the interpreter is interactive, it is also made available to the user as @@ -994,7 +992,6 @@ \ttindex{exc_traceback} \ttindex{last_traceback}} \ttindex{sys.exc_info} -\ttindex{sys.exc_traceback} \ttindex{sys.last_traceback} Special read-only attributes: \member{tb_next} is the next level in the @@ -1198,13 +1195,13 @@ references between objects (e.g., a doubly-linked list or a tree data structure with parent and child pointers); a reference to the object on the stack frame of a function that caught an exception (the -traceback stored in \code{sys.exc_traceback} keeps the stack frame +traceback stored in \code{sys.exc_info()[2]} keeps the stack frame alive); or a reference to the object on the stack frame that raised an unhandled exception in interactive mode (the traceback stored in \code{sys.last_traceback} keeps the stack frame alive). The first situation can only be remedied by explicitly breaking the cycles; the latter two situations can be resolved by storing \code{None} in -\code{sys.exc_traceback} or \code{sys.last_traceback}. Circular +\code{sys.last_traceback}. Circular references which are garbage are detected when the option cycle detector is enabled (it's on by default), but can only be cleaned up if there are no Python-level \method{__del__()} methods involved. Modified: python/branches/cpy_merge/Doc/tut/tut.tex ============================================================================== --- python/branches/cpy_merge/Doc/tut/tut.tex (original) +++ python/branches/cpy_merge/Doc/tut/tut.tex Tue Jun 5 01:44:17 2007 @@ -2653,7 +2653,7 @@ ['__displayhook__', '__doc__', '__excepthook__', '__name__', '__stderr__', '__stdin__', '__stdout__', '_getframe', 'api_version', 'argv', 'builtin_module_names', 'byteorder', 'callstats', 'copyright', - 'displayhook', 'exc_clear', 'exc_info', 'exc_type', 'excepthook', + 'displayhook', 'exc_info', 'excepthook', 'exec_prefix', 'executable', 'exit', 'getdefaultencoding', 'getdlopenflags', 'getrecursionlimit', 'getrefcount', 'hexversion', 'maxint', 'maxunicode', 'meta_path', 'modules', 'path', 'path_hooks', 'path_importer_cache', @@ -2703,7 +2703,7 @@ 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'quit', 'range', - 'reload', 'repr', 'reversed', 'round', 'set', + 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 'vars', 'zip'] \end{verbatim} Modified: python/branches/cpy_merge/Grammar/Grammar ============================================================================== --- python/branches/cpy_merge/Grammar/Grammar (original) +++ python/branches/cpy_merge/Grammar/Grammar Tue Jun 5 01:44:17 2007 @@ -100,7 +100,7 @@ atom: ('(' [yield_expr|testlist_comp] ')' | '[' [testlist_comp] ']' | '{' [dictorsetmaker] '}' | - NAME | NUMBER | STRING+ | '...') + NAME | NUMBER | STRING+ | '...' | 'None' | 'True' | 'False') testlist_comp: test ( comp_for | (',' test)* [','] ) trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME subscriptlist: subscript (',' subscript)* [','] Deleted: /python/branches/cpy_merge/Lib/MimeWriter.py ============================================================================== --- /python/branches/cpy_merge/Lib/MimeWriter.py Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,181 +0,0 @@ -"""Generic MIME writer. - -This module defines the class MimeWriter. The MimeWriter class implements -a basic formatter for creating MIME multi-part files. It doesn't seek around -the output file nor does it use large amounts of buffer space. You must write -the parts out in the order that they should occur in the final file. -MimeWriter does buffer the headers you add, allowing you to rearrange their -order. - -""" - - -import mimetools - -__all__ = ["MimeWriter"] - -class MimeWriter: - - """Generic MIME writer. - - Methods: - - __init__() - addheader() - flushheaders() - startbody() - startmultipartbody() - nextpart() - lastpart() - - A MIME writer is much more primitive than a MIME parser. It - doesn't seek around on the output file, and it doesn't use large - amounts of buffer space, so you have to write the parts in the - order they should occur on the output file. It does buffer the - headers you add, allowing you to rearrange their order. - - General usage is: - - f = - w = MimeWriter(f) - ...call w.addheader(key, value) 0 or more times... - - followed by either: - - f = w.startbody(content_type) - ...call f.write(data) for body data... - - or: - - w.startmultipartbody(subtype) - for each part: - subwriter = w.nextpart() - ...use the subwriter's methods to create the subpart... - w.lastpart() - - The subwriter is another MimeWriter instance, and should be - treated in the same way as the toplevel MimeWriter. This way, - writing recursive body parts is easy. - - Warning: don't forget to call lastpart()! - - XXX There should be more state so calls made in the wrong order - are detected. - - Some special cases: - - - startbody() just returns the file passed to the constructor; - but don't use this knowledge, as it may be changed. - - - startmultipartbody() actually returns a file as well; - this can be used to write the initial 'if you can read this your - mailer is not MIME-aware' message. - - - If you call flushheaders(), the headers accumulated so far are - written out (and forgotten); this is useful if you don't need a - body part at all, e.g. for a subpart of type message/rfc822 - that's (mis)used to store some header-like information. - - - Passing a keyword argument 'prefix=' to addheader(), - start*body() affects where the header is inserted; 0 means - append at the end, 1 means insert at the start; default is - append for addheader(), but insert for start*body(), which use - it to determine where the Content-Type header goes. - - """ - - def __init__(self, fp): - self._fp = fp - self._headers = [] - - def addheader(self, key, value, prefix=0): - """Add a header line to the MIME message. - - The key is the name of the header, where the value obviously provides - the value of the header. The optional argument prefix determines - where the header is inserted; 0 means append at the end, 1 means - insert at the start. The default is to append. - - """ - lines = value.split("\n") - while lines and not lines[-1]: del lines[-1] - while lines and not lines[0]: del lines[0] - for i in range(1, len(lines)): - lines[i] = " " + lines[i].strip() - value = "\n".join(lines) + "\n" - line = key + ": " + value - if prefix: - self._headers.insert(0, line) - else: - self._headers.append(line) - - def flushheaders(self): - """Writes out and forgets all headers accumulated so far. - - This is useful if you don't need a body part at all; for example, - for a subpart of type message/rfc822 that's (mis)used to store some - header-like information. - - """ - self._fp.writelines(self._headers) - self._headers = [] - - def startbody(self, ctype, plist=[], prefix=1): - """Returns a file-like object for writing the body of the message. - - The content-type is set to the provided ctype, and the optional - parameter, plist, provides additional parameters for the - content-type declaration. The optional argument prefix determines - where the header is inserted; 0 means append at the end, 1 means - insert at the start. The default is to insert at the start. - - """ - for name, value in plist: - ctype = ctype + ';\n %s=\"%s\"' % (name, value) - self.addheader("Content-Type", ctype, prefix=prefix) - self.flushheaders() - self._fp.write("\n") - return self._fp - - def startmultipartbody(self, subtype, boundary=None, plist=[], prefix=1): - """Returns a file-like object for writing the body of the message. - - Additionally, this method initializes the multi-part code, where the - subtype parameter provides the multipart subtype, the boundary - parameter may provide a user-defined boundary specification, and the - plist parameter provides optional parameters for the subtype. The - optional argument, prefix, determines where the header is inserted; - 0 means append at the end, 1 means insert at the start. The default - is to insert at the start. Subparts should be created using the - nextpart() method. - - """ - self._boundary = boundary or mimetools.choose_boundary() - return self.startbody("multipart/" + subtype, - [("boundary", self._boundary)] + plist, - prefix=prefix) - - def nextpart(self): - """Returns a new instance of MimeWriter which represents an - individual part in a multipart message. - - This may be used to write the part as well as used for creating - recursively complex multipart messages. The message must first be - initialized with the startmultipartbody() method before using the - nextpart() method. - - """ - self._fp.write("\n--" + self._boundary + "\n") - return self.__class__(self._fp) - - def lastpart(self): - """This is used to designate the last part of a multipart message. - - It should always be used when writing multipart messages. - - """ - self._fp.write("\n--" + self._boundary + "--\n") - - -if __name__ == '__main__': - import test.test_MimeWriter Modified: python/branches/cpy_merge/Lib/SocketServer.py ============================================================================== --- python/branches/cpy_merge/Lib/SocketServer.py (original) +++ python/branches/cpy_merge/Lib/SocketServer.py Tue Jun 5 01:44:17 2007 @@ -518,12 +518,9 @@ self.request = request self.client_address = client_address self.server = server - try: - self.setup() - self.handle() - self.finish() - finally: - sys.exc_traceback = None # Help garbage collection + self.setup() + self.handle() + self.finish() def setup(self): pass Modified: python/branches/cpy_merge/Lib/bsddb/test/test_thread.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/test/test_thread.py (original) +++ python/branches/cpy_merge/Lib/bsddb/test/test_thread.py Tue Jun 5 01:44:17 2007 @@ -10,12 +10,6 @@ from pprint import pprint from random import random -try: - True, False -except NameError: - True = 1 - False = 0 - DASH = '-' try: Modified: python/branches/cpy_merge/Lib/ctypes/wintypes.py ============================================================================== --- python/branches/cpy_merge/Lib/ctypes/wintypes.py (original) +++ python/branches/cpy_merge/Lib/ctypes/wintypes.py Tue Jun 5 01:44:17 2007 @@ -147,7 +147,7 @@ ("dwReserved0", DWORD), ("dwReserved1", DWORD), ("cFileName", c_char * MAX_PATH), - ("cAlternameFileName", c_char * 14)] + ("cAlternateFileName", c_char * 14)] class WIN32_FIND_DATAW(Structure): _fields_ = [("dwFileAttributes", DWORD), @@ -159,7 +159,7 @@ ("dwReserved0", DWORD), ("dwReserved1", DWORD), ("cFileName", c_wchar * MAX_PATH), - ("cAlternameFileName", c_wchar * 14)] + ("cAlternateFileName", c_wchar * 14)] __all__ = ['ATOM', 'BOOL', 'BOOLEAN', 'BYTE', 'COLORREF', 'DOUBLE', 'DWORD', 'FILETIME', 'HACCEL', 'HANDLE', 'HBITMAP', 'HBRUSH', Modified: python/branches/cpy_merge/Lib/dis.py ============================================================================== --- python/branches/cpy_merge/Lib/dis.py (original) +++ python/branches/cpy_merge/Lib/dis.py Tue Jun 5 01:44:17 2007 @@ -23,13 +23,10 @@ if hasattr(x, '__code__'): x = x.__code__ if hasattr(x, '__dict__'): - items = x.__dict__.items() - items.sort() + items = sorted(x.__dict__.items()) for name, x1 in items: - if type(x1) in (types.MethodType, - types.FunctionType, - types.CodeType, - types.ClassType): + if isinstance(x1, (types.MethodType, types.FunctionType, + types.CodeType, types.ClassType, type)): print("Disassembly of %s:" % name) try: dis(x1) @@ -41,9 +38,8 @@ elif isinstance(x, str): disassemble_string(x) else: - raise TypeError, \ - "don't know how to disassemble %s objects" % \ - type(x).__name__ + raise TypeError("don't know how to disassemble %s objects" % + type(x).__name__) def distb(tb=None): """Disassemble a traceback (default: last traceback).""" @@ -55,6 +51,62 @@ while tb.tb_next: tb = tb.tb_next disassemble(tb.tb_frame.f_code, tb.tb_lasti) +# XXX This duplicates information from code.h, also duplicated in inspect.py. +# XXX Maybe this ought to be put in a central location, like opcode.py? +flag2name = { + 1: "OPTIMIZED", + 2: "NEWLOCALS", + 4: "VARARGS", + 8: "VARKEYWORDS", + 16: "NESTED", + 32: "GENERATOR", + 64: "NOFREE", +} + +def pretty_flags(flags): + """Return pretty representation of code flags.""" + names = [] + for i in range(32): + flag = 1<= 4 and line[:4] == QUOTE+'--' and line[-3:] != '--\n': -## multipart = line[:-1] - while multipart: - if line == multipart + '--\n': - ofile.write(pref + line) - multipart = None - line = None - break - if line == multipart + '\n': - ofile.write(pref + line) - nifile = File(ifile, multipart) - unmimify_part(nifile, ofile, decode_base64) - line = nifile.peek - if not line: - # premature end of file - break - continue - # not a boundary between parts - break - if line and quoted_printable: - while line[-2:] == '=\n': - line = line[:-2] - newline = ifile.readline() - if newline[:len(QUOTE)] == QUOTE: - newline = newline[len(QUOTE):] - line = line + newline - line = mime_decode(line) - if line and is_base64 and not pref: - import base64 - line = base64.decodestring(line) - if line: - ofile.write(pref + line) - -def unmimify(infile, outfile, decode_base64 = 0): - """Convert quoted-printable parts of a MIME mail message to 8bit.""" - if type(infile) == type(''): - ifile = open(infile) - if type(outfile) == type('') and infile == outfile: - import os - d, f = os.path.split(infile) - os.rename(infile, os.path.join(d, ',' + f)) - else: - ifile = infile - if type(outfile) == type(''): - ofile = open(outfile, 'w') - else: - ofile = outfile - nifile = File(ifile, None) - unmimify_part(nifile, ofile, decode_base64) - ofile.flush() - -mime_char = re.compile('[=\177-\377]') # quote these chars in body -mime_header_char = re.compile('[=?\177-\377]') # quote these in header - -def mime_encode(line, header): - """Code a single line as quoted-printable. - If header is set, quote some extra characters.""" - if header: - reg = mime_header_char - else: - reg = mime_char - newline = '' - pos = 0 - if len(line) >= 5 and line[:5] == 'From ': - # quote 'From ' at the start of a line for stupid mailers - newline = ('=%02x' % ord('F')).upper() - pos = 1 - while 1: - res = reg.search(line, pos) - if res is None: - break - newline = newline + line[pos:res.start(0)] + \ - ('=%02x' % ord(res.group(0))).upper() - pos = res.end(0) - line = newline + line[pos:] - - newline = '' - while len(line) >= 75: - i = 73 - while line[i] == '=' or line[i-1] == '=': - i = i - 1 - i = i + 1 - newline = newline + line[:i] + '=\n' - line = line[i:] - return newline + line - -mime_header = re.compile('([ \t(]|^)([-a-zA-Z0-9_+]*[\177-\377][-a-zA-Z0-9_+\177-\377]*)(?=[ \t)]|\n)') - -def mime_encode_header(line): - """Code a single header line as quoted-printable.""" - newline = '' - pos = 0 - while 1: - res = mime_header.search(line, pos) - if res is None: - break - newline = '%s%s%s=?%s?Q?%s?=' % \ - (newline, line[pos:res.start(0)], res.group(1), - CHARSET, mime_encode(res.group(2), 1)) - pos = res.end(0) - return newline + line[pos:] - -mv = re.compile('^mime-version:', re.I) -cte = re.compile('^content-transfer-encoding:', re.I) -iso_char = re.compile('[\177-\377]') - -def mimify_part(ifile, ofile, is_mime): - """Convert an 8bit part of a MIME mail message to quoted-printable.""" - has_cte = is_qp = is_base64 = 0 - multipart = None - must_quote_body = must_quote_header = has_iso_chars = 0 - - header = [] - header_end = '' - message = [] - message_end = '' - # read header - hfile = HeaderFile(ifile) - while 1: - line = hfile.readline() - if not line: - break - if not must_quote_header and iso_char.search(line): - must_quote_header = 1 - if mv.match(line): - is_mime = 1 - if cte.match(line): - has_cte = 1 - if qp.match(line): - is_qp = 1 - elif base64_re.match(line): - is_base64 = 1 - mp_res = mp.match(line) - if mp_res: - multipart = '--' + mp_res.group(1) - if he.match(line): - header_end = line - break - header.append(line) - - # read body - while 1: - line = ifile.readline() - if not line: - break - if multipart: - if line == multipart + '--\n': - message_end = line - break - if line == multipart + '\n': - message_end = line - break - if is_base64: - message.append(line) - continue - if is_qp: - while line[-2:] == '=\n': - line = line[:-2] - newline = ifile.readline() - if newline[:len(QUOTE)] == QUOTE: - newline = newline[len(QUOTE):] - line = line + newline - line = mime_decode(line) - message.append(line) - if not has_iso_chars: - if iso_char.search(line): - has_iso_chars = must_quote_body = 1 - if not must_quote_body: - if len(line) > MAXLEN: - must_quote_body = 1 - - # convert and output header and body - for line in header: - if must_quote_header: - line = mime_encode_header(line) - chrset_res = chrset.match(line) - if chrset_res: - if has_iso_chars: - # change us-ascii into iso-8859-1 - if chrset_res.group(2).lower() == 'us-ascii': - line = '%s%s%s' % (chrset_res.group(1), - CHARSET, - chrset_res.group(3)) - else: - # change iso-8859-* into us-ascii - line = '%sus-ascii%s' % chrset_res.group(1, 3) - if has_cte and cte.match(line): - line = 'Content-Transfer-Encoding: ' - if is_base64: - line = line + 'base64\n' - elif must_quote_body: - line = line + 'quoted-printable\n' - else: - line = line + '7bit\n' - ofile.write(line) - if (must_quote_header or must_quote_body) and not is_mime: - ofile.write('Mime-Version: 1.0\n') - ofile.write('Content-Type: text/plain; ') - if has_iso_chars: - ofile.write('charset="%s"\n' % CHARSET) - else: - ofile.write('charset="us-ascii"\n') - if must_quote_body and not has_cte: - ofile.write('Content-Transfer-Encoding: quoted-printable\n') - ofile.write(header_end) - - for line in message: - if must_quote_body: - line = mime_encode(line, 0) - ofile.write(line) - ofile.write(message_end) - - line = message_end - while multipart: - if line == multipart + '--\n': - # read bit after the end of the last part - while 1: - line = ifile.readline() - if not line: - return - if must_quote_body: - line = mime_encode(line, 0) - ofile.write(line) - if line == multipart + '\n': - nifile = File(ifile, multipart) - mimify_part(nifile, ofile, 1) - line = nifile.peek - if not line: - # premature end of file - break - ofile.write(line) - continue - # unexpectedly no multipart separator--copy rest of file - while 1: - line = ifile.readline() - if not line: - return - if must_quote_body: - line = mime_encode(line, 0) - ofile.write(line) - -def mimify(infile, outfile): - """Convert 8bit parts of a MIME mail message to quoted-printable.""" - if type(infile) == type(''): - ifile = open(infile) - if type(outfile) == type('') and infile == outfile: - import os - d, f = os.path.split(infile) - os.rename(infile, os.path.join(d, ',' + f)) - else: - ifile = infile - if type(outfile) == type(''): - ofile = open(outfile, 'w') - else: - ofile = outfile - nifile = File(ifile, None) - mimify_part(nifile, ofile, 0) - ofile.flush() - -import sys -if __name__ == '__main__' or (len(sys.argv) > 0 and sys.argv[0] == 'mimify'): - import getopt - usage = 'Usage: mimify [-l len] -[ed] [infile [outfile]]' - - decode_base64 = 0 - opts, args = getopt.getopt(sys.argv[1:], 'l:edb') - if len(args) not in (0, 1, 2): - print(usage) - sys.exit(1) - if (('-e', '') in opts) == (('-d', '') in opts) or \ - ((('-b', '') in opts) and (('-d', '') not in opts)): - print(usage) - sys.exit(1) - for o, a in opts: - if o == '-e': - encode = mimify - elif o == '-d': - encode = unmimify - elif o == '-l': - try: - MAXLEN = int(a) - except (ValueError, OverflowError): - print(usage) - sys.exit(1) - elif o == '-b': - decode_base64 = 1 - if len(args) == 0: - encode_args = (sys.stdin, sys.stdout) - elif len(args) == 1: - encode_args = (args[0], sys.stdout) - else: - encode_args = (args[0], args[1]) - if decode_base64: - encode_args = encode_args + (decode_base64,) - encode(*encode_args) Modified: python/branches/cpy_merge/Lib/optparse.py ============================================================================== --- python/branches/cpy_merge/Lib/optparse.py (original) +++ python/branches/cpy_merge/Lib/optparse.py Tue Jun 5 01:44:17 2007 @@ -816,12 +816,6 @@ SUPPRESS_HELP = "SUPPRESS"+"HELP" SUPPRESS_USAGE = "SUPPRESS"+"USAGE" -# For compatibility with Python 2.2 -try: - True, False -except NameError: - (True, False) = (1, 0) - def isbasestring(x): return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType) Modified: python/branches/cpy_merge/Lib/os.py ============================================================================== --- python/branches/cpy_merge/Lib/os.py (original) +++ python/branches/cpy_merge/Lib/os.py Tue Jun 5 01:44:17 2007 @@ -388,13 +388,14 @@ else: envpath = defpath PATH = envpath.split(pathsep) - saved_exc = None + last_exc = saved_exc = None saved_tb = None for dir in PATH: fullname = path.join(dir, file) try: func(fullname, *argrest) except error as e: + last_exc = e tb = sys.exc_info()[2] if (e.errno != ENOENT and e.errno != ENOTDIR and saved_exc is None): @@ -402,7 +403,7 @@ saved_tb = tb if saved_exc: raise error, saved_exc, saved_tb - raise error, e, tb + raise error, last_exc, tb # Change environ to automatically call putenv() if it exists try: Modified: python/branches/cpy_merge/Lib/plat-mac/buildtools.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/buildtools.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/buildtools.py Tue Jun 5 01:44:17 2007 @@ -13,6 +13,9 @@ import EasyDialogs import shutil +import warnings +warnings.warn("the buildtools module is deprecated", DeprecationWarning, 2) + BuildError = "BuildError" Deleted: /python/branches/cpy_merge/Lib/plat-mac/cfmfile.py ============================================================================== --- /python/branches/cpy_merge/Lib/plat-mac/cfmfile.py Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,183 +0,0 @@ -"""codefragments.py -- wrapper to modify code fragments.""" - -# (c) 1998, Just van Rossum, Letterror - -__version__ = "0.8b3" -__author__ = "jvr" - -import Carbon.File -import struct -from Carbon import Res -import os -import sys - -DEBUG = 0 - -error = "cfm.error" - -BUFSIZE = 0x80000 - -def mergecfmfiles(srclist, dst, architecture = 'fat'): - """Merge all files in srclist into a new file dst. - - If architecture is given, only code fragments of that type will be used: - "pwpc" for PPC, "m68k" for cfm68k. This does not work for "classic" - 68k code, since it does not use code fragments to begin with. - If architecture is None, all fragments will be used, enabling FAT binaries. - """ - - srclist = list(srclist) - for i in range(len(srclist)): - srclist[i] = Carbon.File.pathname(srclist[i]) - dst = Carbon.File.pathname(dst) - - dstfile = open(dst, "wb") - rf = Res.FSpOpenResFile(dst, 3) - try: - dstcfrg = CfrgResource() - for src in srclist: - srccfrg = CfrgResource(src) - for frag in srccfrg.fragments: - if frag.architecture == 'pwpc' and architecture == 'm68k': - continue - if frag.architecture == 'm68k' and architecture == 'pwpc': - continue - dstcfrg.append(frag) - - frag.copydata(dstfile) - - cfrgres = Res.Resource(dstcfrg.build()) - Res.UseResFile(rf) - cfrgres.AddResource('cfrg', 0, "") - finally: - dstfile.close() - rf = Res.CloseResFile(rf) - - -class CfrgResource: - - def __init__(self, path = None): - self.version = 1 - self.fragments = [] - self.path = path - if path is not None and os.path.exists(path): - currentresref = Res.CurResFile() - resref = Res.FSpOpenResFile(path, 1) - Res.UseResFile(resref) - try: - try: - data = Res.Get1Resource('cfrg', 0).data - except Res.Error: - raise Res.Error, "no 'cfrg' resource found", sys.exc_traceback - finally: - Res.CloseResFile(resref) - Res.UseResFile(currentresref) - self.parse(data) - if self.version != 1: - raise error, "unknown 'cfrg' resource format" - - def parse(self, data): - (res1, res2, self.version, - res3, res4, res5, res6, - self.memberCount) = struct.unpack("8l", data[:32]) - data = data[32:] - while data: - frag = FragmentDescriptor(self.path, data) - data = data[frag.memberSize:] - self.fragments.append(frag) - - def build(self): - self.memberCount = len(self.fragments) - data = struct.pack("8l", 0, 0, self.version, 0, 0, 0, 0, self.memberCount) - for frag in self.fragments: - data = data + frag.build() - return data - - def append(self, frag): - self.fragments.append(frag) - - -class FragmentDescriptor: - - def __init__(self, path, data = None): - self.path = path - if data is not None: - self.parse(data) - - def parse(self, data): - self.architecture = data[:4] - ( self.updatelevel, - self.currentVersion, - self.oldDefVersion, - self.stacksize, - self.applibdir, - self.fragtype, - self.where, - self.offset, - self.length, - self.res1, self.res2, - self.memberSize,) = struct.unpack("4lhBB4lh", data[4:42]) - pname = data[42:self.memberSize] - self.name = pname[1:1+ord(pname[0])] - - def build(self): - data = self.architecture - data = data + struct.pack("4lhBB4l", - self.updatelevel, - self.currentVersion, - self.oldDefVersion, - self.stacksize, - self.applibdir, - self.fragtype, - self.where, - self.offset, - self.length, - self.res1, self.res2) - self.memberSize = len(data) + 2 + 1 + len(self.name) - # pad to 4 byte boundaries - if self.memberSize % 4: - self.memberSize = self.memberSize + 4 - (self.memberSize % 4) - data = data + struct.pack("hb", self.memberSize, len(self.name)) - data = data + self.name - data = data + '\000' * (self.memberSize - len(data)) - return data - - def getfragment(self): - if self.where != 1: - raise error, "can't read fragment, unsupported location" - f = open(self.path, "rb") - f.seek(self.offset) - if self.length: - frag = f.read(self.length) - else: - frag = f.read() - f.close() - return frag - - def copydata(self, outfile): - if self.where != 1: - raise error, "can't read fragment, unsupported location" - infile = open(self.path, "rb") - if self.length == 0: - infile.seek(0, 2) - self.length = infile.tell() - - # Position input file and record new offset from output file - infile.seek(self.offset) - - # pad to 16 byte boundaries - offset = outfile.tell() - if offset % 16: - offset = offset + 16 - (offset % 16) - outfile.seek(offset) - self.offset = offset - - l = self.length - while l: - if l > BUFSIZE: - outfile.write(infile.read(BUFSIZE)) - l = l - BUFSIZE - else: - outfile.write(infile.read(l)) - l = 0 - infile.close() Deleted: /python/branches/cpy_merge/Lib/posixfile.py ============================================================================== --- /python/branches/cpy_merge/Lib/posixfile.py Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,237 +0,0 @@ -"""Extended file operations available in POSIX. - -f = posixfile.open(filename, [mode, [bufsize]]) - will create a new posixfile object - -f = posixfile.fileopen(fileobject) - will create a posixfile object from a builtin file object - -f.file() - will return the original builtin file object - -f.dup() - will return a new file object based on a new filedescriptor - -f.dup2(fd) - will return a new file object based on the given filedescriptor - -f.flags(mode) - will turn on the associated flag (merge) - mode can contain the following characters: - - (character representing a flag) - a append only flag - c close on exec flag - n no delay flag - s synchronization flag - (modifiers) - ! turn flags 'off' instead of default 'on' - = copy flags 'as is' instead of default 'merge' - ? return a string in which the characters represent the flags - that are set - - note: - the '!' and '=' modifiers are mutually exclusive. - - the '?' modifier will return the status of the flags after they - have been changed by other characters in the mode string - -f.lock(mode [, len [, start [, whence]]]) - will (un)lock a region - mode can contain the following characters: - - (character representing type of lock) - u unlock - r read lock - w write lock - (modifiers) - | wait until the lock can be granted - ? return the first lock conflicting with the requested lock - or 'None' if there is no conflict. The lock returned is in the - format (mode, len, start, whence, pid) where mode is a - character representing the type of lock ('r' or 'w') - - note: - the '?' modifier prevents a region from being locked; it is - query only -""" -import warnings -warnings.warn("The posixfile module is deprecated; " - "fcntl.lockf() provides better locking", DeprecationWarning, 2) - -class _posixfile_: - """File wrapper class that provides extra POSIX file routines.""" - - states = ['open', 'closed'] - - # - # Internal routines - # - def __repr__(self): - file = self._file_ - return "<%s posixfile '%s', mode '%s' at %s>" % \ - (self.states[file.closed], file.name, file.mode, \ - hex(id(self))[2:]) - - # - # Initialization routines - # - def open(self, name, mode='r', bufsize=-1): - import __builtin__ - return self.fileopen(__builtin__.open(name, mode, bufsize)) - - def fileopen(self, file): - import types - if repr(type(file)) != "": - raise TypeError, 'posixfile.fileopen() arg must be file object' - self._file_ = file - # Copy basic file methods - for maybemethod in dir(file): - if not maybemethod.startswith('_'): - attr = getattr(file, maybemethod) - if isinstance(attr, types.BuiltinMethodType): - setattr(self, maybemethod, attr) - return self - - # - # New methods - # - def file(self): - return self._file_ - - def dup(self): - import posix - - if not hasattr(posix, 'fdopen'): - raise AttributeError, 'dup() method unavailable' - - return posix.fdopen(posix.dup(self._file_.fileno()), self._file_.mode) - - def dup2(self, fd): - import posix - - if not hasattr(posix, 'fdopen'): - raise AttributeError, 'dup() method unavailable' - - posix.dup2(self._file_.fileno(), fd) - return posix.fdopen(fd, self._file_.mode) - - def flags(self, *which): - import fcntl, os - - if which: - if len(which) > 1: - raise TypeError, 'Too many arguments' - which = which[0] - else: which = '?' - - l_flags = 0 - if 'n' in which: l_flags = l_flags | os.O_NDELAY - if 'a' in which: l_flags = l_flags | os.O_APPEND - if 's' in which: l_flags = l_flags | os.O_SYNC - - file = self._file_ - - if '=' not in which: - cur_fl = fcntl.fcntl(file.fileno(), fcntl.F_GETFL, 0) - if '!' in which: l_flags = cur_fl & ~ l_flags - else: l_flags = cur_fl | l_flags - - l_flags = fcntl.fcntl(file.fileno(), fcntl.F_SETFL, l_flags) - - if 'c' in which: - arg = ('!' not in which) # 0 is don't, 1 is do close on exec - l_flags = fcntl.fcntl(file.fileno(), fcntl.F_SETFD, arg) - - if '?' in which: - which = '' # Return current flags - l_flags = fcntl.fcntl(file.fileno(), fcntl.F_GETFL, 0) - if os.O_APPEND & l_flags: which = which + 'a' - if fcntl.fcntl(file.fileno(), fcntl.F_GETFD, 0) & 1: - which = which + 'c' - if os.O_NDELAY & l_flags: which = which + 'n' - if os.O_SYNC & l_flags: which = which + 's' - return which - - def lock(self, how, *args): - import struct, fcntl - - if 'w' in how: l_type = fcntl.F_WRLCK - elif 'r' in how: l_type = fcntl.F_RDLCK - elif 'u' in how: l_type = fcntl.F_UNLCK - else: raise TypeError, 'no type of lock specified' - - if '|' in how: cmd = fcntl.F_SETLKW - elif '?' in how: cmd = fcntl.F_GETLK - else: cmd = fcntl.F_SETLK - - l_whence = 0 - l_start = 0 - l_len = 0 - - if len(args) == 1: - l_len = args[0] - elif len(args) == 2: - l_len, l_start = args - elif len(args) == 3: - l_len, l_start, l_whence = args - elif len(args) > 3: - raise TypeError, 'too many arguments' - - # Hack by davem at magnet.com to get locking to go on freebsd; - # additions for AIX by Vladimir.Marangozov at imag.fr - import sys, os - if sys.platform in ('netbsd1', - 'openbsd2', - 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', - 'freebsd6', 'freebsd7', - 'bsdos2', 'bsdos3', 'bsdos4'): - flock = struct.pack('lxxxxlxxxxlhh', \ - l_start, l_len, os.getpid(), l_type, l_whence) - elif sys.platform in ('aix3', 'aix4'): - flock = struct.pack('hhlllii', \ - l_type, l_whence, l_start, l_len, 0, 0, 0) - else: - flock = struct.pack('hhllhh', \ - l_type, l_whence, l_start, l_len, 0, 0) - - flock = fcntl.fcntl(self._file_.fileno(), cmd, flock) - - if '?' in how: - if sys.platform in ('netbsd1', - 'openbsd2', - 'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5', - 'bsdos2', 'bsdos3', 'bsdos4'): - l_start, l_len, l_pid, l_type, l_whence = \ - struct.unpack('lxxxxlxxxxlhh', flock) - elif sys.platform in ('aix3', 'aix4'): - l_type, l_whence, l_start, l_len, l_sysid, l_pid, l_vfs = \ - struct.unpack('hhlllii', flock) - elif sys.platform == "linux2": - l_type, l_whence, l_start, l_len, l_pid, l_sysid = \ - struct.unpack('hhllhh', flock) - else: - l_type, l_whence, l_start, l_len, l_sysid, l_pid = \ - struct.unpack('hhllhh', flock) - - if l_type != fcntl.F_UNLCK: - if l_type == fcntl.F_RDLCK: - return 'r', l_len, l_start, l_whence, l_pid - else: - return 'w', l_len, l_start, l_whence, l_pid - -def open(name, mode='r', bufsize=-1): - """Public routine to open a file as a posixfile object.""" - return _posixfile_().open(name, mode, bufsize) - -def fileopen(file): - """Public routine to get a posixfile object from a Python file object.""" - return _posixfile_().fileopen(file) - -# -# Constants -# -SEEK_SET = 0 -SEEK_CUR = 1 -SEEK_END = 2 - -# -# End of posixfile.py -# Modified: python/branches/cpy_merge/Lib/pydoc.py ============================================================================== --- python/branches/cpy_merge/Lib/pydoc.py (original) +++ python/branches/cpy_merge/Lib/pydoc.py Tue Jun 5 01:44:17 2007 @@ -273,12 +273,11 @@ # that inherits from another module that has changed). if forceload and path in sys.modules: if path not in sys.builtin_module_names: - # Avoid simply calling reload() because it leaves names in - # the currently loaded module lying around if they're not - # defined in the new source file. Instead, remove the - # module from sys.modules and re-import. Also remove any - # submodules because they won't appear in the newly loaded - # module's namespace if they're already in sys.modules. + # Remove the module from sys.modules and re-import to try + # and avoid problems with partially loaded modules. + # Also remove any submodules because they won't appear + # in the newly loaded module's namespace if they're already + # in sys.modules. subs = [m for m in sys.modules if m.startswith(path + '.')] for key in [path] + subs: # Prevent garbage collection. Deleted: /python/branches/cpy_merge/Lib/sha.py ============================================================================== --- /python/branches/cpy_merge/Lib/sha.py Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,11 +0,0 @@ -# $Id$ -# -# Copyright (C) 2005 Gregory P. Smith (greg at electricrain.com) -# Licensed to PSF under a Contributor Agreement. - -from hashlib import sha1 as sha -new = sha - -blocksize = 1 # legacy value (wrong in any useful sense) -digest_size = 20 -digestsize = 20 Modified: python/branches/cpy_merge/Lib/shlex.py ============================================================================== --- python/branches/cpy_merge/Lib/shlex.py (original) +++ python/branches/cpy_merge/Lib/shlex.py Tue Jun 5 01:44:17 2007 @@ -271,8 +271,8 @@ raise StopIteration return token -def split(s, comments=False): - lex = shlex(s, posix=True) +def split(s, comments=False, posix=True): + lex = shlex(s, posix=posix) lex.whitespace_split = True if not comments: lex.commenters = '' Modified: python/branches/cpy_merge/Lib/subprocess.py ============================================================================== --- python/branches/cpy_merge/Lib/subprocess.py (original) +++ python/branches/cpy_merge/Lib/subprocess.py Tue Jun 5 01:44:17 2007 @@ -340,13 +340,6 @@ except: MAXFD = 256 -# True/False does not exist on 2.2.0 -try: - False -except NameError: - False = 0 - True = 1 - _active = [] def _cleanup(): @@ -479,9 +472,10 @@ if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") - if close_fds: + if close_fds and (stdin is not None or stdout is not None or + stderr is not None): raise ValueError("close_fds is not supported on Windows " - "platforms") + "platforms if you redirect stdin/stdout/stderr") else: # POSIX if startupinfo is not None: @@ -738,9 +732,7 @@ hp, ht, pid, tid = CreateProcess(executable, args, # no special security None, None, - # must inherit handles to pass std - # handles - 1, + int(not close_fds), creationflags, env, cwd, Modified: python/branches/cpy_merge/Lib/tarfile.py ============================================================================== --- python/branches/cpy_merge/Lib/tarfile.py (original) +++ python/branches/cpy_merge/Lib/tarfile.py Tue Jun 5 01:44:17 2007 @@ -127,6 +127,17 @@ PAX_FIELDS = ("path", "linkpath", "size", "mtime", "uid", "gid", "uname", "gname") +# Fields in a pax header that are numbers, all other fields +# are treated as strings. +PAX_NUMBER_FIELDS = { + "atime": float, + "ctime": float, + "mtime": float, + "uid": int, + "gid": int, + "size": int +} + #--------------------------------------------------------- # Bits used in the mode field, values in octal. #--------------------------------------------------------- @@ -156,7 +167,7 @@ #--------------------------------------------------------- ENCODING = sys.getfilesystemencoding() if ENCODING is None: - ENCODING = "ascii" + ENCODING = sys.getdefaultencoding() #--------------------------------------------------------- # Some useful functions @@ -220,6 +231,26 @@ s = chr(0200) + s return s +def uts(s, encoding, errors): + """Convert a unicode object to a string. + """ + if errors == "utf-8": + # An extra error handler similar to the -o invalid=UTF-8 option + # in POSIX.1-2001. Replace untranslatable characters with their + # UTF-8 representation. + try: + return s.encode(encoding, "strict") + except UnicodeEncodeError: + x = [] + for c in s: + try: + x.append(c.encode(encoding, "strict")) + except UnicodeEncodeError: + x.append(c.encode("utf8")) + return "".join(x) + else: + return s.encode(encoding, errors) + def calc_chksums(buf): """Calculate the checksum for a member's header by summing up all characters except for the chksum field which is treated as if @@ -924,7 +955,7 @@ def __repr__(self): return "<%s %r at %#x>" % (self.__class__.__name__,self.name,id(self)) - def get_info(self): + def get_info(self, encoding, errors): """Return the TarInfo's attributes as a dictionary. """ info = { @@ -946,24 +977,29 @@ if info["type"] == DIRTYPE and not info["name"].endswith("/"): info["name"] += "/" + for key in ("name", "linkname", "uname", "gname"): + if type(info[key]) is unicode: + info[key] = info[key].encode(encoding, errors) + return info - def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING): + def tobuf(self, format=DEFAULT_FORMAT, encoding=ENCODING, errors="strict"): """Return a tar header as a string of 512 byte blocks. """ + info = self.get_info(encoding, errors) + if format == USTAR_FORMAT: - return self.create_ustar_header() + return self.create_ustar_header(info) elif format == GNU_FORMAT: - return self.create_gnu_header() + return self.create_gnu_header(info) elif format == PAX_FORMAT: - return self.create_pax_header(encoding) + return self.create_pax_header(info, encoding, errors) else: raise ValueError("invalid format") - def create_ustar_header(self): + def create_ustar_header(self, info): """Return the object as a ustar header block. """ - info = self.get_info() info["magic"] = POSIX_MAGIC if len(info["linkname"]) > LENGTH_LINK: @@ -974,10 +1010,9 @@ return self._create_header(info, USTAR_FORMAT) - def create_gnu_header(self): + def create_gnu_header(self, info): """Return the object as a GNU header block sequence. """ - info = self.get_info() info["magic"] = GNU_MAGIC buf = "" @@ -989,12 +1024,11 @@ return buf + self._create_header(info, GNU_FORMAT) - def create_pax_header(self, encoding): + def create_pax_header(self, info, encoding, errors): """Return the object as a ustar header block. If it cannot be represented this way, prepend a pax extended header sequence with supplement information. """ - info = self.get_info() info["magic"] = POSIX_MAGIC pax_headers = self.pax_headers.copy() @@ -1004,7 +1038,11 @@ ("name", "path", LENGTH_NAME), ("linkname", "linkpath", LENGTH_LINK), ("uname", "uname", 32), ("gname", "gname", 32)): - val = info[name].decode(encoding) + if hname in pax_headers: + # The pax header has priority. + continue + + val = info[name].decode(encoding, errors) # Try to encode the string as ASCII. try: @@ -1013,27 +1051,23 @@ pax_headers[hname] = val continue - if len(val) > length: - if name == "name": - # Try to squeeze a longname in the prefix and name fields as in - # ustar format. - try: - info["prefix"], info["name"] = self._posix_split_name(info["name"]) - except ValueError: - pax_headers[hname] = val - else: - continue - else: - pax_headers[hname] = val + if len(info[name]) > length: + pax_headers[hname] = val # Test number fields for values that exceed the field limit or values # that like to be stored as float. for name, digits in (("uid", 8), ("gid", 8), ("size", 12), ("mtime", 12)): + if name in pax_headers: + # The pax header has priority. Avoid overflow. + info[name] = 0 + continue + val = info[name] if not 0 <= val < 8 ** (digits - 1) or isinstance(val, float): pax_headers[name] = unicode(val) info[name] = 0 + # Create a pax extended header if necessary. if pax_headers: buf = self._create_pax_generic_header(pax_headers) else: @@ -1042,26 +1076,10 @@ return buf + self._create_header(info, USTAR_FORMAT) @classmethod - def create_pax_global_header(cls, pax_headers, encoding): + def create_pax_global_header(cls, pax_headers): """Return the object as a pax global header block sequence. """ - new_headers = {} - for key, val in pax_headers.items(): - key = cls._to_unicode(key, encoding) - val = cls._to_unicode(val, encoding) - new_headers[key] = val - return cls._create_pax_generic_header(new_headers, type=XGLTYPE) - - @staticmethod - def _to_unicode(value, encoding): - if isinstance(value, unicode): - return value - elif isinstance(value, (int, float)): - return unicode(value) - elif isinstance(value, str): - return unicode(value, encoding) - else: - raise ValueError("unable to convert to unicode: %r" % value) + return cls._create_pax_generic_header(pax_headers, type=XGLTYPE) def _posix_split_name(self, name): """Split a name longer than 100 chars into a prefix @@ -1093,9 +1111,9 @@ " ", # checksum field info.get("type", REGTYPE), stn(info.get("linkname", ""), 100), - stn(info.get("magic", ""), 8), - stn(info.get("uname", ""), 32), - stn(info.get("gname", ""), 32), + stn(info.get("magic", POSIX_MAGIC), 8), + stn(info.get("uname", "root"), 32), + stn(info.get("gname", "root"), 32), itn(info.get("devmajor", 0), 8, format), itn(info.get("devminor", 0), 8, format), stn(info.get("prefix", ""), 155) @@ -1256,12 +1274,9 @@ offset += self._block(self.size) tarfile.offset = offset - # Patch the TarInfo object with saved extended + # Patch the TarInfo object with saved global # header information. - for keyword, value in tarfile.pax_headers.items(): - if keyword in PAX_FIELDS: - setattr(self, keyword, value) - self.pax_headers[keyword] = value + self._apply_pax_info(tarfile.pax_headers, tarfile.encoding, tarfile.errors) return self @@ -1272,18 +1287,17 @@ buf = tarfile.fileobj.read(self._block(self.size)) # Fetch the next header and process it. - b = tarfile.fileobj.read(BLOCKSIZE) - t = self.frombuf(b) - t.offset = self.offset - next = t._proc_member(tarfile) + next = self.fromtarfile(tarfile) + if next is None: + raise HeaderError("missing subsequent header") # Patch the TarInfo object from the next header with # the longname information. next.offset = self.offset if self.type == GNUTYPE_LONGNAME: - next.name = buf.rstrip(NUL) + next.name = nts(buf) elif self.type == GNUTYPE_LONGLINK: - next.linkname = buf.rstrip(NUL) + next.linkname = nts(buf) return next @@ -1358,21 +1372,10 @@ else: pax_headers = tarfile.pax_headers.copy() - # Fields in POSIX.1-2001 that are numbers, all other fields - # are treated as UTF-8 strings. - type_mapping = { - "atime": float, - "ctime": float, - "mtime": float, - "uid": int, - "gid": int, - "size": int - } - # Parse pax header information. A record looks like that: # "%d %s=%s\n" % (length, keyword, value). length is the size # of the complete record including the length field itself and - # the newline. + # the newline. keyword and value are both UTF-8 encoded strings. regex = re.compile(r"(\d+) ([^=]+)=", re.U) pos = 0 while True: @@ -1385,35 +1388,55 @@ value = buf[match.end(2) + 1:match.start(1) + length - 1] keyword = keyword.decode("utf8") - keyword = keyword.encode(tarfile.encoding) - value = value.decode("utf8") - if keyword in type_mapping: + + pax_headers[keyword] = value + pos += length + + # Fetch the next header. + next = self.fromtarfile(tarfile) + + if self.type in (XHDTYPE, SOLARIS_XHDTYPE): + if next is None: + raise HeaderError("missing subsequent header") + + # Patch the TarInfo object with the extended header info. + next._apply_pax_info(pax_headers, tarfile.encoding, tarfile.errors) + next.offset = self.offset + + if "size" in pax_headers: + # If the extended header replaces the size field, + # we need to recalculate the offset where the next + # header starts. + offset = next.offset_data + if next.isreg() or next.type not in SUPPORTED_TYPES: + offset += next._block(next.size) + tarfile.offset = offset + + return next + + def _apply_pax_info(self, pax_headers, encoding, errors): + """Replace fields with supplemental information from a previous + pax extended or global header. + """ + for keyword, value in pax_headers.items(): + if keyword not in PAX_FIELDS: + continue + + if keyword == "path": + value = value.rstrip("/") + + if keyword in PAX_NUMBER_FIELDS: try: - value = type_mapping[keyword](value) + value = PAX_NUMBER_FIELDS[keyword](value) except ValueError: value = 0 else: - value = value.encode(tarfile.encoding) - - pax_headers[keyword] = value - pos += length + value = uts(value, encoding, errors) - # Fetch the next header that will be patched with the - # supplement information from the pax header (extended - # only). - t = self.fromtarfile(tarfile) - - if self.type != XGLTYPE and t is not None: - # Patch the TarInfo object from the next header with - # the pax header's information. - for keyword, value in pax_headers.items(): - if keyword in PAX_FIELDS: - setattr(t, keyword, value) - pax_headers[keyword] = value - t.pax_headers = pax_headers.copy() + setattr(self, keyword, value) - return t + self.pax_headers = pax_headers.copy() def _block(self, count): """Round up a byte count by BLOCKSIZE and return it, @@ -1464,8 +1487,9 @@ format = DEFAULT_FORMAT # The format to use when creating an archive. - encoding = ENCODING # Transfer UTF-8 strings from POSIX.1-2001 - # headers to this encoding. + encoding = ENCODING # Encoding for 8-bit character strings. + + errors = None # Error handler for unicode conversion. tarinfo = TarInfo # The default TarInfo class to use. @@ -1473,7 +1497,7 @@ def __init__(self, name=None, mode="r", fileobj=None, format=None, tarinfo=None, dereference=None, ignore_zeros=None, encoding=None, - pax_headers=None, debug=None, errorlevel=None): + errors=None, pax_headers=None, debug=None, errorlevel=None): """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' @@ -1492,7 +1516,7 @@ # Create nonexistent files in append mode. self.mode = "w" self._mode = "wb" - fileobj = _open(name, self._mode) + fileobj = bltn_open(name, self._mode) self._extfileobj = False else: if name is None and hasattr(fileobj, "name"): @@ -1514,6 +1538,19 @@ self.ignore_zeros = ignore_zeros if encoding is not None: self.encoding = encoding + + if errors is not None: + self.errors = errors + elif mode == "r": + self.errors = "utf-8" + else: + self.errors = "strict" + + if pax_headers is not None and self.format == PAX_FORMAT: + self.pax_headers = pax_headers + else: + self.pax_headers = {} + if debug is not None: self.debug = debug if errorlevel is not None: @@ -1526,7 +1563,6 @@ self.offset = 0 # current position in the archive file self.inodes = {} # dictionary caching the inodes of # archive members already added - self.pax_headers = {} # save contents of global pax headers if self.mode == "r": self.firstmember = None @@ -1545,9 +1581,8 @@ if self.mode in "aw": self._loaded = True - if pax_headers: - buf = self.tarinfo.create_pax_global_header( - pax_headers.copy(), self.encoding) + if self.pax_headers: + buf = self.tarinfo.create_pax_global_header(self.pax_headers.copy()) self.fileobj.write(buf) self.offset += len(buf) @@ -1669,7 +1704,7 @@ raise CompressionError("gzip module is not available") if fileobj is None: - fileobj = _open(name, mode + "b") + fileobj = bltn_open(name, mode + "b") try: t = cls.taropen(name, mode, @@ -1819,8 +1854,6 @@ self.inodes[inode] = arcname elif stat.S_ISDIR(stmd): type = DIRTYPE - if arcname[-1:] != "/": - arcname += "/" elif stat.S_ISFIFO(stmd): type = FIFOTYPE elif stat.S_ISLNK(stmd): @@ -1930,7 +1963,7 @@ # Append the tar header and data to the archive. if tarinfo.isreg(): - f = _open(name, "rb") + f = bltn_open(name, "rb") self.addfile(tarinfo, f) f.close() @@ -1954,7 +1987,7 @@ tarinfo = copy.copy(tarinfo) - buf = tarinfo.tobuf(self.format, self.encoding) + buf = tarinfo.tobuf(self.format, self.encoding, self.errors) self.fileobj.write(buf) self.offset += len(buf) @@ -2141,7 +2174,7 @@ """Make a file called targetpath. """ source = self.extractfile(tarinfo) - target = _open(targetpath, "wb") + target = bltn_open(targetpath, "wb") copyfileobj(source, target) source.close() target.close() @@ -2486,4 +2519,5 @@ except TarError: return False +bltn_open = open open = TarFile.open Deleted: /python/branches/cpy_merge/Lib/test/infinite_reload.py ============================================================================== --- /python/branches/cpy_merge/Lib/test/infinite_reload.py Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,7 +0,0 @@ -# For testing http://python.org/sf/742342, which reports that Python -# segfaults (infinite recursion in C) in the presence of infinite -# reload()ing. This module is imported by test_import.py:test_infinite_reload -# to make sure this doesn't happen any more. - -import infinite_reload -reload(infinite_reload) Modified: python/branches/cpy_merge/Lib/test/output/test_pkg ============================================================================== --- python/branches/cpy_merge/Lib/test/output/test_pkg (original) +++ python/branches/cpy_merge/Lib/test/output/test_pkg Tue Jun 5 01:44:17 2007 @@ -15,8 +15,6 @@ t3 loading t3.sub.subsub loading t3 t3.sub t3.sub.subsub -t3 loading -t3.sub.subsub loading running test t4 t4 loading t4.sub.subsub loading Modified: python/branches/cpy_merge/Lib/test/regrtest.py ============================================================================== --- python/branches/cpy_merge/Lib/test/regrtest.py (original) +++ python/branches/cpy_merge/Lib/test/regrtest.py Tue Jun 5 01:44:17 2007 @@ -669,7 +669,8 @@ indirect_test() else: def run_the_test(): - reload(the_module) + del sys.modules[the_module.__name__] + exec('import ' + the_module.__name__) deltas = [] nwarmup, ntracked, fname = huntrleaks @@ -841,7 +842,6 @@ test_signal test_sunaudiodev test_threadsignals - test_timing test_wait3 test_wait4 """, @@ -894,7 +894,6 @@ test_sunaudiodev test_sundry test_tarfile - test_timing """, 'unixware7': """ @@ -992,7 +991,6 @@ test_threaded_import test_threadedtempfile test_threading - test_timing """, 'darwin': """ Deleted: /python/branches/cpy_merge/Lib/test/test_MimeWriter.py ============================================================================== --- /python/branches/cpy_merge/Lib/test/test_MimeWriter.py Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,291 +0,0 @@ -"""Test program for MimeWriter module. - -The test program was too big to comfortably fit in the MimeWriter -class, so it's here in its own file. - -This should generate Barry's example, modulo some quotes and newlines. - -""" - -import unittest, sys, StringIO -from test.test_support import run_unittest - -from MimeWriter import MimeWriter - -SELLER = '''\ -INTERFACE Seller-1; - -TYPE Seller = OBJECT - DOCUMENTATION "A simple Seller interface to test ILU" - METHODS - price():INTEGER, - END; -''' - -BUYER = '''\ -class Buyer: - def __setup__(self, maxprice): - self._maxprice = maxprice - - def __main__(self, kos): - """Entry point upon arrival at a new KOS.""" - broker = kos.broker() - # B4 == Barry's Big Bass Business :-) - seller = broker.lookup('Seller_1.Seller', 'B4') - if seller: - price = seller.price() - print 'Seller wants $', price, '... ' - if price > self._maxprice: - print 'too much!' - else: - print "I'll take it!" - else: - print 'no seller found here' -''' # Don't ask why this comment is here - -STATE = '''\ -# instantiate a buyer instance and put it in a magic place for the KOS -# to find. -__kp__ = Buyer() -__kp__.__setup__(500) -''' - -SIMPLE_METADATA = [ - ("Interpreter", "python"), - ("Interpreter-Version", "1.3"), - ("Owner-Name", "Barry Warsaw"), - ("Owner-Rendezvous", "bwarsaw at cnri.reston.va.us"), - ("Home-KSS", "kss.cnri.reston.va.us"), - ("Identifier", "hdl://cnri.kss/my_first_knowbot"), - ("Launch-Date", "Mon Feb 12 16:39:03 EST 1996"), - ] - -COMPLEX_METADATA = [ - ("Metadata-Type", "complex"), - ("Metadata-Key", "connection"), - ("Access", "read-only"), - ("Connection-Description", "Barry's Big Bass Business"), - ("Connection-Id", "B4"), - ("Connection-Direction", "client"), - ] - -EXTERNAL_METADATA = [ - ("Metadata-Type", "complex"), - ("Metadata-Key", "generic-interface"), - ("Access", "read-only"), - ("Connection-Description", "Generic Interface for All Knowbots"), - ("Connection-Id", "generic-kp"), - ("Connection-Direction", "client"), - ] - - -OUTPUT = '''\ -From: bwarsaw at cnri.reston.va.us -Date: Mon Feb 12 17:21:48 EST 1996 -To: kss-submit at cnri.reston.va.us -MIME-Version: 1.0 -Content-Type: multipart/knowbot; - boundary="801spam999"; - version="0.1" - -This is a multi-part message in MIME format. - ---801spam999 -Content-Type: multipart/knowbot-metadata; - boundary="802spam999" - - ---802spam999 -Content-Type: message/rfc822 -KP-Metadata-Type: simple -KP-Access: read-only - -KPMD-Interpreter: python -KPMD-Interpreter-Version: 1.3 -KPMD-Owner-Name: Barry Warsaw -KPMD-Owner-Rendezvous: bwarsaw at cnri.reston.va.us -KPMD-Home-KSS: kss.cnri.reston.va.us -KPMD-Identifier: hdl://cnri.kss/my_first_knowbot -KPMD-Launch-Date: Mon Feb 12 16:39:03 EST 1996 - ---802spam999 -Content-Type: text/isl -KP-Metadata-Type: complex -KP-Metadata-Key: connection -KP-Access: read-only -KP-Connection-Description: Barry's Big Bass Business -KP-Connection-Id: B4 -KP-Connection-Direction: client - -INTERFACE Seller-1; - -TYPE Seller = OBJECT - DOCUMENTATION "A simple Seller interface to test ILU" - METHODS - price():INTEGER, - END; - ---802spam999 -Content-Type: message/external-body; - access-type="URL"; - URL="hdl://cnri.kss/generic-knowbot" - -Content-Type: text/isl -KP-Metadata-Type: complex -KP-Metadata-Key: generic-interface -KP-Access: read-only -KP-Connection-Description: Generic Interface for All Knowbots -KP-Connection-Id: generic-kp -KP-Connection-Direction: client - - ---802spam999-- - ---801spam999 -Content-Type: multipart/knowbot-code; - boundary="803spam999" - - ---803spam999 -Content-Type: text/plain -KP-Module-Name: BuyerKP - -class Buyer: - def __setup__(self, maxprice): - self._maxprice = maxprice - - def __main__(self, kos): - """Entry point upon arrival at a new KOS.""" - broker = kos.broker() - # B4 == Barry's Big Bass Business :-) - seller = broker.lookup('Seller_1.Seller', 'B4') - if seller: - price = seller.price() - print 'Seller wants $', price, '... ' - if price > self._maxprice: - print 'too much!' - else: - print "I'll take it!" - else: - print 'no seller found here' - ---803spam999-- - ---801spam999 -Content-Type: multipart/knowbot-state; - boundary="804spam999" -KP-Main-Module: main - - ---804spam999 -Content-Type: text/plain -KP-Module-Name: main - -# instantiate a buyer instance and put it in a magic place for the KOS -# to find. -__kp__ = Buyer() -__kp__.__setup__(500) - ---804spam999-- - ---801spam999-- -''' - -class MimewriterTest(unittest.TestCase): - - def test(self): - buf = StringIO.StringIO() - - # Toplevel headers - - toplevel = MimeWriter(buf) - toplevel.addheader("From", "bwarsaw at cnri.reston.va.us") - toplevel.addheader("Date", "Mon Feb 12 17:21:48 EST 1996") - toplevel.addheader("To", "kss-submit at cnri.reston.va.us") - toplevel.addheader("MIME-Version", "1.0") - - # Toplevel body parts - - f = toplevel.startmultipartbody("knowbot", "801spam999", - [("version", "0.1")], prefix=0) - f.write("This is a multi-part message in MIME format.\n") - - # First toplevel body part: metadata - - md = toplevel.nextpart() - md.startmultipartbody("knowbot-metadata", "802spam999") - - # Metadata part 1 - - md1 = md.nextpart() - md1.addheader("KP-Metadata-Type", "simple") - md1.addheader("KP-Access", "read-only") - m = MimeWriter(md1.startbody("message/rfc822")) - for key, value in SIMPLE_METADATA: - m.addheader("KPMD-" + key, value) - m.flushheaders() - del md1 - - # Metadata part 2 - - md2 = md.nextpart() - for key, value in COMPLEX_METADATA: - md2.addheader("KP-" + key, value) - f = md2.startbody("text/isl") - f.write(SELLER) - del md2 - - # Metadata part 3 - - md3 = md.nextpart() - f = md3.startbody("message/external-body", - [("access-type", "URL"), - ("URL", "hdl://cnri.kss/generic-knowbot")]) - m = MimeWriter(f) - for key, value in EXTERNAL_METADATA: - md3.addheader("KP-" + key, value) - md3.startbody("text/isl") - # Phantom body doesn't need to be written - - md.lastpart() - - # Second toplevel body part: code - - code = toplevel.nextpart() - code.startmultipartbody("knowbot-code", "803spam999") - - # Code: buyer program source - - buyer = code.nextpart() - buyer.addheader("KP-Module-Name", "BuyerKP") - f = buyer.startbody("text/plain") - f.write(BUYER) - - code.lastpart() - - # Third toplevel body part: state - - state = toplevel.nextpart() - state.addheader("KP-Main-Module", "main") - state.startmultipartbody("knowbot-state", "804spam999") - - # State: a bunch of assignments - - st = state.nextpart() - st.addheader("KP-Module-Name", "main") - f = st.startbody("text/plain") - f.write(STATE) - - state.lastpart() - - # End toplevel body parts - - toplevel.lastpart() - - self.assertEqual(buf.getvalue(), OUTPUT) - -def test_main(): - run_unittest(MimewriterTest) - -if __name__ == '__main__': - test_main() Modified: python/branches/cpy_merge/Lib/test/test___all__.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test___all__.py (original) +++ python/branches/cpy_merge/Lib/test/test___all__.py Tue Jun 5 01:44:17 2007 @@ -1,7 +1,6 @@ import unittest from test.test_support import verbose, run_unittest import sys -import warnings class AllTest(unittest.TestCase): @@ -34,7 +33,6 @@ self.check_all("CGIHTTPServer") self.check_all("ConfigParser") self.check_all("Cookie") - self.check_all("MimeWriter") self.check_all("Queue") self.check_all("SimpleHTTPServer") self.check_all("SocketServer") @@ -92,7 +90,6 @@ self.check_all("mhlib") self.check_all("mimetools") self.check_all("mimetypes") - self.check_all("mimify") self.check_all("multifile") self.check_all("netrc") self.check_all("nntplib") Modified: python/branches/cpy_merge/Lib/test/test_builtin.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_builtin.py (original) +++ python/branches/cpy_merge/Lib/test/test_builtin.py Tue Jun 5 01:44:17 2007 @@ -1558,14 +1558,6 @@ fp.close() unlink(TESTFN) - def test_reload(self): - import marshal - reload(marshal) - import string - reload(string) - ## import sys - ## self.assertRaises(ImportError, reload, sys) - def test_repr(self): self.assertEqual(repr(''), '\'\'') self.assertEqual(repr(0), '0') Modified: python/branches/cpy_merge/Lib/test/test_dis.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_dis.py (original) +++ python/branches/cpy_merge/Lib/test/test_dis.py Tue Jun 5 01:44:17 2007 @@ -89,6 +89,18 @@ 7 RETURN_VALUE """ +dis_module_expected_results = """\ +Disassembly of f: + 4 0 LOAD_CONST 0 (None) + 3 RETURN_VALUE + +Disassembly of g: + 5 0 LOAD_CONST 0 (None) + 3 RETURN_VALUE + +""" + + class DisTests(unittest.TestCase): def do_disassembly_test(self, func, expected): s = StringIO.StringIO() @@ -127,6 +139,7 @@ self.do_disassembly_test(bug708901, dis_bug708901) def test_bug_1333982(self): + # XXX: re-enable this test! # This one is checking bytecodes generated for an `assert` statement, # so fails if the tests are run with -O. Skip this test then. pass # Test has been disabled due to change in the way @@ -153,9 +166,12 @@ expected = _BIG_LINENO_FORMAT % (i + 2) self.do_disassembly_test(func(i), expected) + def test_big_linenos(self): + from test import dis_module + self.do_disassembly_test(dis_module, dis_module_expected_results) + def test_main(): run_unittest(DisTests) - if __name__ == "__main__": test_main() Modified: python/branches/cpy_merge/Lib/test/test_doctest.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_doctest.py (original) +++ python/branches/cpy_merge/Lib/test/test_doctest.py Tue Jun 5 01:44:17 2007 @@ -2409,7 +2409,7 @@ def test_coverage(coverdir): tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,], trace=0, count=1) - tracer.run('reload(doctest); test_main()') + tracer.run('test_main()') r = tracer.results() print('Writing coverage results...') r.write_results(show_missing=True, summary=True, Modified: python/branches/cpy_merge/Lib/test/test_hmac.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_hmac.py (original) +++ python/branches/cpy_merge/Lib/test/test_hmac.py Tue Jun 5 01:44:17 2007 @@ -1,5 +1,5 @@ import hmac -import sha +from hashlib import sha1 import unittest from test import test_support @@ -43,7 +43,7 @@ def test_sha_vectors(self): def shatest(key, data, digest): - h = hmac.HMAC(key, data, digestmod=sha) + h = hmac.HMAC(key, data, digestmod=sha1) self.assertEqual(h.hexdigest().upper(), digest.upper()) shatest(chr(0x0b) * 20, @@ -95,11 +95,11 @@ def test_withmodule(self): # Constructor call with text and digest module. - import sha + from hashlib import sha1 try: - h = hmac.HMAC("key", "", sha) + h = hmac.HMAC("key", "", sha1) except: - self.fail("Constructor call with sha module raised exception.") + self.fail("Constructor call with hashlib.sha1 raised exception.") class SanityTestCase(unittest.TestCase): Modified: python/branches/cpy_merge/Lib/test/test_import.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_import.py (original) +++ python/branches/cpy_merge/Lib/test/test_import.py Tue Jun 5 01:44:17 2007 @@ -6,6 +6,7 @@ import sys import py_compile import warnings +from test.test_support import unlink def remove_files(name): @@ -63,22 +64,9 @@ self.assertEquals(mod.b, b, "module loaded (%s) but contents invalid" % mod) finally: - os.unlink(source) - - try: - try: - reload(mod) - except ImportError as err: - self.fail("import from .pyc/.pyo failed: %s" % err) - finally: - try: - os.unlink(pyc) - except OSError: - pass - try: - os.unlink(pyo) - except OSError: - pass + unlink(source) + unlink(pyc) + unlink(pyo) del sys.modules[TESTFN] sys.path.insert(0, os.curdir) @@ -136,6 +124,8 @@ # New in 2.4, we shouldn't be able to import that no matter how often # we try. sys.path.insert(0, os.curdir) + if TESTFN in sys.modules: + del sys.modules[TESTFN] try: for i in 1, 2, 3: try: @@ -149,60 +139,6 @@ sys.path.pop(0) remove_files(TESTFN) - def test_failing_reload(self): - # A failing reload should leave the module object in sys.modules. - source = TESTFN + os.extsep + "py" - f = open(source, "w") - print("a = 1", file=f) - print("b = 2", file=f) - f.close() - - sys.path.insert(0, os.curdir) - try: - mod = __import__(TESTFN) - self.assert_(TESTFN in sys.modules, "expected module in sys.modules") - self.assertEquals(mod.a, 1, "module has wrong attribute values") - self.assertEquals(mod.b, 2, "module has wrong attribute values") - - # On WinXP, just replacing the .py file wasn't enough to - # convince reload() to reparse it. Maybe the timestamp didn't - # move enough. We force it to get reparsed by removing the - # compiled file too. - remove_files(TESTFN) - - # Now damage the module. - f = open(source, "w") - print("a = 10", file=f) - print("b = 20//0", file=f) - f.close() - - self.assertRaises(ZeroDivisionError, reload, mod) - - # But we still expect the module to be in sys.modules. - mod = sys.modules.get(TESTFN) - self.failIf(mod is None, "expected module to still be in sys.modules") - - # We should have replaced a w/ 10, but the old b value should - # stick. - self.assertEquals(mod.a, 10, "module has wrong attribute values") - self.assertEquals(mod.b, 2, "module has wrong attribute values") - - finally: - sys.path.pop(0) - remove_files(TESTFN) - if TESTFN in sys.modules: - del sys.modules[TESTFN] - - def test_infinite_reload(self): - # Bug #742342 reports that Python segfaults (infinite recursion in C) - # when faced with self-recursive reload()ing. - - sys.path.insert(0, os.path.dirname(__file__)) - try: - import infinite_reload - finally: - sys.path.pop(0) - def test_import_name_binding(self): # import x.y.z binds x in the current namespace import test as x Modified: python/branches/cpy_merge/Lib/test/test_importhooks.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_importhooks.py (original) +++ python/branches/cpy_merge/Lib/test/test_importhooks.py Tue Jun 5 01:44:17 2007 @@ -190,10 +190,6 @@ import reloadmodule self.failIf(hasattr(reloadmodule,'reloaded')) - TestImporter.modules['reloadmodule'] = (False, reload_co) - reload(reloadmodule) - self.failUnless(hasattr(reloadmodule,'reloaded')) - import hooktestpackage.newrel self.assertEqual(hooktestpackage.newrel.get_name(), "hooktestpackage.newrel") Modified: python/branches/cpy_merge/Lib/test/test_inspect.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_inspect.py (original) +++ python/branches/cpy_merge/Lib/test/test_inspect.py Tue Jun 5 01:44:17 2007 @@ -25,7 +25,7 @@ try: 1/0 except: - tb = sys.exc_traceback + tb = sys.exc_info()[2] git = mod.StupidGit() Modified: python/branches/cpy_merge/Lib/test/test_optparse.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_optparse.py (original) +++ python/branches/cpy_merge/Lib/test/test_optparse.py Tue Jun 5 01:44:17 2007 @@ -27,12 +27,6 @@ from optparse import _match_abbrev from optparse import _parse_num -# Do the right thing with boolean values for all known Python versions. -try: - True, False -except NameError: - (True, False) = (1, 0) - retype = type(re.compile('')) class InterceptedError(Exception): Modified: python/branches/cpy_merge/Lib/test/test_os.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_os.py (original) +++ python/branches/cpy_merge/Lib/test/test_os.py Tue Jun 5 01:44:17 2007 @@ -381,7 +381,7 @@ os.remove(dirname) os.rmdir(test_support.TESTFN) -class MakedirTests (unittest.TestCase): +class MakedirTests(unittest.TestCase): def setUp(self): os.mkdir(test_support.TESTFN) @@ -400,9 +400,6 @@ 'dir5', 'dir6') os.makedirs(path) - - - def tearDown(self): path = os.path.join(test_support.TESTFN, 'dir1', 'dir2', 'dir3', 'dir4', 'dir5', 'dir6') @@ -414,7 +411,7 @@ os.removedirs(path) -class DevNullTests (unittest.TestCase): +class DevNullTests(unittest.TestCase): def test_devnull(self): f = open(os.devnull, 'w') f.write('hello') @@ -423,7 +420,7 @@ self.assertEqual(f.read(), '') f.close() -class URandomTests (unittest.TestCase): +class URandomTests(unittest.TestCase): def test_urandom(self): try: self.assertEqual(len(os.urandom(1)), 1) @@ -433,6 +430,10 @@ except NotImplementedError: pass +class ExecTests(unittest.TestCase): + def test_execvpe_with_bad_program(self): + self.assertRaises(OSError, os.execvpe, 'no such app-', [], None) + class Win32ErrorTests(unittest.TestCase): def test_rename(self): self.assertRaises(WindowsError, os.rename, test_support.TESTFN, test_support.TESTFN+".bak") @@ -469,6 +470,7 @@ MakedirTests, DevNullTests, URandomTests, + ExecTests, Win32ErrorTests ) Modified: python/branches/cpy_merge/Lib/test/test_pkg.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_pkg.py (original) +++ python/branches/cpy_merge/Lib/test/test_pkg.py Tue Jun 5 01:44:17 2007 @@ -120,9 +120,6 @@ """ import t3.sub.subsub print(t3.__name__, t3.sub.__name__, t3.sub.subsub.__name__) -reload(t3) -reload(t3.sub) -reload(t3.sub.subsub) """), ("t4", [ Modified: python/branches/cpy_merge/Lib/test/test_subprocess.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_subprocess.py (original) +++ python/branches/cpy_merge/Lib/test/test_subprocess.py Tue Jun 5 01:44:17 2007 @@ -617,8 +617,16 @@ self.assertRaises(ValueError, subprocess.call, [sys.executable, "-c", "import sys; sys.exit(47)"], + stdout=subprocess.PIPE, close_fds=True) + def test_close_fds(self): + # close file descriptors + rc = subprocess.call([sys.executable, "-c", + "import sys; sys.exit(47)"], + close_fds=True) + self.assertEqual(rc, 47) + def test_shell_sequence(self): # Run command through the shell (sequence) newenv = os.environ.copy() Modified: python/branches/cpy_merge/Lib/test/test_sundry.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_sundry.py (original) +++ python/branches/cpy_merge/Lib/test/test_sundry.py Tue Jun 5 01:44:17 2007 @@ -4,9 +4,6 @@ import warnings with guard_warnings_filter(): - warnings.filterwarnings('ignore', r".*posixfile", - DeprecationWarning) - from test.test_support import verbose import BaseHTTPServer @@ -33,7 +30,6 @@ import linecache import macurl2path import mailcap - import mimify import mutex import nntplib import nturl2path @@ -42,7 +38,6 @@ import pdb import pipes #import poplib - import posixfile import pstats import py_compile import pydoc Modified: python/branches/cpy_merge/Lib/test/test_syntax.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_syntax.py (original) +++ python/branches/cpy_merge/Lib/test/test_syntax.py Tue Jun 5 01:44:17 2007 @@ -27,15 +27,13 @@ Errors from set_context(): -TODO(jhylton): "assignment to None" is inconsistent with other messages - >>> obj.None = 1 Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: invalid syntax >>> None = 1 Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: assignment to keyword (, line 1) It's a syntax error to assign to the empty tuple. Why isn't it an error to assign to the empty list? It will always raise some error at @@ -95,7 +93,7 @@ >>> def f(None=1): ... pass Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: invalid syntax From ast_for_arguments(): @@ -108,17 +106,17 @@ >>> def f(x, None): ... pass Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: invalid syntax >>> def f(*None): ... pass Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: invalid syntax >>> def f(**None): ... pass Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: invalid syntax From ast_for_funcdef(): @@ -126,7 +124,7 @@ >>> def None(x): ... pass Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: invalid syntax From ast_for_call(): @@ -231,7 +229,7 @@ SyntaxError: augmented assignment to generator expression not possible (, line 1) >>> None += 1 Traceback (most recent call last): -SyntaxError: assignment to None (, line 1) +SyntaxError: assignment to keyword (, line 1) >>> f() += 1 Traceback (most recent call last): SyntaxError: illegal expression for augmented assignment (, line 1) Modified: python/branches/cpy_merge/Lib/test/test_sys.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_sys.py (original) +++ python/branches/cpy_merge/Lib/test/test_sys.py Tue Jun 5 01:44:17 2007 @@ -63,47 +63,6 @@ # FIXME: testing the code for a lost or replaced excepthook in # Python/pythonrun.c::PyErr_PrintEx() is tricky. - def test_exc_clear(self): - self.assertRaises(TypeError, sys.exc_clear, 42) - - # Verify that exc_info is present and matches exc, then clear it, and - # check that it worked. - def clear_check(exc): - typ, value, traceback = sys.exc_info() - self.assert_(typ is not None) - self.assert_(value is exc) - self.assert_(traceback is not None) - - sys.exc_clear() - - typ, value, traceback = sys.exc_info() - self.assert_(typ is None) - self.assert_(value is None) - self.assert_(traceback is None) - - def clear(): - try: - raise ValueError, 42 - except ValueError as exc: - clear_check(exc) - - # Raise an exception and check that it can be cleared - clear() - - # Verify that a frame currently handling an exception is - # unaffected by calling exc_clear in a nested frame. - try: - raise ValueError, 13 - except ValueError as exc: - typ1, value1, traceback1 = sys.exc_info() - clear() - typ2, value2, traceback2 = sys.exc_info() - - self.assert_(typ1 is typ2) - self.assert_(value1 is exc) - self.assert_(value1 is value2) - self.assert_(traceback1 is traceback2) - def test_exit(self): self.assertRaises(TypeError, sys.exit, 42, 42) Modified: python/branches/cpy_merge/Lib/test/test_tarfile.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_tarfile.py (original) +++ python/branches/cpy_merge/Lib/test/test_tarfile.py Tue Jun 5 01:44:17 2007 @@ -1,4 +1,4 @@ -# encoding: iso8859-1 +# -*- coding: iso-8859-15 -*- import sys import os @@ -372,9 +372,9 @@ def test_read_longname(self): # Test reading of longname (bug #1471427). - name = self.subdir + "/" + "123/" * 125 + "longname" + longname = self.subdir + "/" + "123/" * 125 + "longname" try: - tarinfo = self.tar.getmember(name) + tarinfo = self.tar.getmember(longname) except KeyError: self.fail("longname not found") self.assert_(tarinfo.type != tarfile.DIRTYPE, "read longname as dirtype") @@ -393,13 +393,24 @@ tarinfo = self.tar.getmember(longname) offset = tarinfo.offset self.tar.fileobj.seek(offset) - fobj = StringIO.StringIO(self.tar.fileobj.read(1536)) + fobj = StringIO.StringIO(self.tar.fileobj.read(3 * 512)) self.assertRaises(tarfile.ReadError, tarfile.open, name="foo.tar", fileobj=fobj) + def test_header_offset(self): + # Test if the start offset of the TarInfo object includes + # the preceding extended header. + longname = self.subdir + "/" + "123/" * 125 + "longname" + offset = self.tar.getmember(longname).offset + fobj = open(tarname) + fobj.seek(offset) + tarinfo = tarfile.TarInfo.frombuf(fobj.read(512)) + self.assertEqual(tarinfo.type, self.longnametype) + class GNUReadTest(LongnameTest): subdir = "gnu" + longnametype = tarfile.GNUTYPE_LONGNAME def test_sparse_file(self): tarinfo1 = self.tar.getmember("ustar/sparse") @@ -410,26 +421,40 @@ "sparse file extraction failed") -class PaxReadTest(ReadTest): +class PaxReadTest(LongnameTest): subdir = "pax" + longnametype = tarfile.XHDTYPE - def test_pax_globheaders(self): + def test_pax_global_headers(self): tar = tarfile.open(tarname, encoding="iso8859-1") + tarinfo = tar.getmember("pax/regtype1") self.assertEqual(tarinfo.uname, "foo") self.assertEqual(tarinfo.gname, "bar") - self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"), "???????") + self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"), u"???????") tarinfo = tar.getmember("pax/regtype2") self.assertEqual(tarinfo.uname, "") self.assertEqual(tarinfo.gname, "bar") - self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"), "???????") + self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"), u"???????") tarinfo = tar.getmember("pax/regtype3") self.assertEqual(tarinfo.uname, "tarfile") self.assertEqual(tarinfo.gname, "tarfile") - self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"), "???????") + self.assertEqual(tarinfo.pax_headers.get("VENDOR.umlauts"), u"???????") + + def test_pax_number_fields(self): + # All following number fields are read from the pax header. + tar = tarfile.open(tarname, encoding="iso8859-1") + tarinfo = tar.getmember("pax/regtype4") + self.assertEqual(tarinfo.size, 7011) + self.assertEqual(tarinfo.uid, 123) + self.assertEqual(tarinfo.gid, 123) + self.assertEqual(tarinfo.mtime, 1041808783.0) + self.assertEqual(type(tarinfo.mtime), float) + self.assertEqual(float(tarinfo.pax_headers["atime"]), 1041808783.0) + self.assertEqual(float(tarinfo.pax_headers["ctime"]), 1041808783.0) class WriteTest(unittest.TestCase): @@ -700,68 +725,161 @@ n = tar.getmembers()[0].name self.assert_(name == n, "PAX longname creation failed") - def test_iso8859_15_filename(self): - self._test_unicode_filename("iso8859-15") + def test_pax_global_header(self): + pax_headers = { + u"foo": u"bar", + u"uid": u"0", + u"mtime": u"1.23", + u"test": u"???", + u"???": u"test"} + + tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT, \ + pax_headers=pax_headers) + tar.addfile(tarfile.TarInfo("test")) + tar.close() + + # Test if the global header was written correctly. + tar = tarfile.open(tmpname, encoding="iso8859-1") + self.assertEqual(tar.pax_headers, pax_headers) + self.assertEqual(tar.getmembers()[0].pax_headers, pax_headers) + + # Test if all the fields are unicode. + for key, val in tar.pax_headers.items(): + self.assert_(type(key) is unicode) + self.assert_(type(val) is unicode) + if key in tarfile.PAX_NUMBER_FIELDS: + try: + tarfile.PAX_NUMBER_FIELDS[key](val) + except (TypeError, ValueError): + self.fail("unable to convert pax header field") + + def test_pax_extended_header(self): + # The fields from the pax header have priority over the + # TarInfo. + pax_headers = {u"path": u"foo", u"uid": u"123"} + + tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT, encoding="iso8859-1") + t = tarfile.TarInfo() + t.name = u"???" # non-ASCII + t.uid = 8**8 # too large + t.pax_headers = pax_headers + tar.addfile(t) + tar.close() + + tar = tarfile.open(tmpname, encoding="iso8859-1") + t = tar.getmembers()[0] + self.assertEqual(t.pax_headers, pax_headers) + self.assertEqual(t.name, "foo") + self.assertEqual(t.uid, 123) + + +class UstarUnicodeTest(unittest.TestCase): + # All *UnicodeTests FIXME + + format = tarfile.USTAR_FORMAT + + def test_iso8859_1_filename(self): + self._test_unicode_filename("iso8859-1") + + def test_utf7_filename(self): + self._test_unicode_filename("utf7") def test_utf8_filename(self): self._test_unicode_filename("utf8") - def test_utf16_filename(self): - self._test_unicode_filename("utf16") - def _test_unicode_filename(self, encoding): - tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT) - name = u"\u20ac".encode(encoding) # Euro sign - tar.encoding = encoding + tar = tarfile.open(tmpname, "w", format=self.format, encoding=encoding, errors="strict") + name = u"???" tar.addfile(tarfile.TarInfo(name)) tar.close() tar = tarfile.open(tmpname, encoding=encoding) - self.assertEqual(tar.getmembers()[0].name, name) + self.assert_(type(tar.getnames()[0]) is not unicode) + self.assertEqual(tar.getmembers()[0].name, name.encode(encoding)) tar.close() def test_unicode_filename_error(self): - # The euro sign filename cannot be translated to iso8859-1 encoding. - tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT, encoding="utf8") - name = u"\u20ac".encode("utf8") # Euro sign - tar.addfile(tarfile.TarInfo(name)) + tar = tarfile.open(tmpname, "w", format=self.format, encoding="ascii", errors="strict") + tarinfo = tarfile.TarInfo() + + tarinfo.name = "???" + if self.format == tarfile.PAX_FORMAT: + self.assertRaises(UnicodeError, tar.addfile, tarinfo) + else: + tar.addfile(tarinfo) + + tarinfo.name = u"???" + self.assertRaises(UnicodeError, tar.addfile, tarinfo) + + tarinfo.name = "foo" + tarinfo.uname = u"???" + self.assertRaises(UnicodeError, tar.addfile, tarinfo) + + def test_unicode_argument(self): + tar = tarfile.open(tarname, "r", encoding="iso8859-1", errors="strict") + for t in tar: + self.assert_(type(t.name) is str) + self.assert_(type(t.linkname) is str) + self.assert_(type(t.uname) is str) + self.assert_(type(t.gname) is str) tar.close() - self.assertRaises(UnicodeError, tarfile.open, tmpname, encoding="iso8859-1") + def test_uname_unicode(self): + for name in (u"???", "???"): + t = tarfile.TarInfo("foo") + t.uname = name + t.gname = name - def test_pax_headers(self): - self._test_pax_headers({"foo": "bar", "uid": 0, "mtime": 1.23}) + fobj = StringIO.StringIO() + tar = tarfile.open("foo.tar", mode="w", fileobj=fobj, format=self.format, encoding="iso8859-1") + tar.addfile(t) + tar.close() + fobj.seek(0) - self._test_pax_headers({"euro": u"\u20ac".encode("utf8")}) + tar = tarfile.open("foo.tar", fileobj=fobj, encoding="iso8859-1") + t = tar.getmember("foo") + self.assertEqual(t.uname, "???") + self.assertEqual(t.gname, "???") - self._test_pax_headers({"euro": u"\u20ac"}, - {"euro": u"\u20ac".encode("utf8")}) - self._test_pax_headers({u"\u20ac": "euro"}, - {u"\u20ac".encode("utf8"): "euro"}) +class GNUUnicodeTest(UstarUnicodeTest): - def _test_pax_headers(self, pax_headers, cmp_headers=None): - if cmp_headers is None: - cmp_headers = pax_headers + format = tarfile.GNU_FORMAT - tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT, \ - pax_headers=pax_headers, encoding="utf8") - tar.addfile(tarfile.TarInfo("test")) - tar.close() - tar = tarfile.open(tmpname, encoding="utf8") - self.assertEqual(tar.pax_headers, cmp_headers) +class PaxUnicodeTest(UstarUnicodeTest): - def test_truncated_header(self): - tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT) - tarinfo = tarfile.TarInfo("123/" * 126 + "longname") - tar.addfile(tarinfo) + format = tarfile.PAX_FORMAT + + def _create_unicode_name(self, name): + tar = tarfile.open(tmpname, "w", format=self.format) + t = tarfile.TarInfo() + t.pax_headers["path"] = name + tar.addfile(t) tar.close() - # Simulate a premature EOF. - open(tmpname, "rb+").truncate(1536) - tar = tarfile.open(tmpname) - self.assertEqual(tar.getmembers(), []) + def test_error_handlers(self): + # Test if the unicode error handlers work correctly for characters + # that cannot be expressed in a given encoding. + self._create_unicode_name(u"???") + + for handler, name in (("utf-8", u"???".encode("utf8")), + ("replace", "???"), ("ignore", "")): + tar = tarfile.open(tmpname, format=self.format, encoding="ascii", + errors=handler) + self.assertEqual(tar.getnames()[0], name) + + self.assertRaises(UnicodeError, tarfile.open, tmpname, + encoding="ascii", errors="strict") + + def test_error_handler_utf8(self): + # Create a pathname that has one component representable using + # iso8859-1 and the other only in iso8859-15. + self._create_unicode_name(u"???/?") + + tar = tarfile.open(tmpname, format=self.format, encoding="iso8859-1", + errors="utf-8") + self.assertEqual(tar.getnames()[0], "???/" + u"?".encode("utf8")) class AppendTest(unittest.TestCase): @@ -836,63 +954,58 @@ def test_ustar_limits(self): # 100 char name tarinfo = tarfile.TarInfo("0123456789" * 10) - tarinfo.create_ustar_header() + tarinfo.tobuf(tarfile.USTAR_FORMAT) # 101 char name that cannot be stored tarinfo = tarfile.TarInfo("0123456789" * 10 + "0") - self.assertRaises(ValueError, tarinfo.create_ustar_header) + self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT) # 256 char name with a slash at pos 156 tarinfo = tarfile.TarInfo("123/" * 62 + "longname") - tarinfo.create_ustar_header() + tarinfo.tobuf(tarfile.USTAR_FORMAT) # 256 char name that cannot be stored tarinfo = tarfile.TarInfo("1234567/" * 31 + "longname") - self.assertRaises(ValueError, tarinfo.create_ustar_header) + self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT) # 512 char name tarinfo = tarfile.TarInfo("123/" * 126 + "longname") - self.assertRaises(ValueError, tarinfo.create_ustar_header) + self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT) # 512 char linkname tarinfo = tarfile.TarInfo("longlink") tarinfo.linkname = "123/" * 126 + "longname" - self.assertRaises(ValueError, tarinfo.create_ustar_header) + self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT) # uid > 8 digits tarinfo = tarfile.TarInfo("name") tarinfo.uid = 010000000 - self.assertRaises(ValueError, tarinfo.create_ustar_header) + self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT) def test_gnu_limits(self): tarinfo = tarfile.TarInfo("123/" * 126 + "longname") - tarinfo.create_gnu_header() + tarinfo.tobuf(tarfile.GNU_FORMAT) tarinfo = tarfile.TarInfo("longlink") tarinfo.linkname = "123/" * 126 + "longname" - tarinfo.create_gnu_header() + tarinfo.tobuf(tarfile.GNU_FORMAT) # uid >= 256 ** 7 tarinfo = tarfile.TarInfo("name") tarinfo.uid = 04000000000000000000 - self.assertRaises(ValueError, tarinfo.create_gnu_header) + self.assertRaises(ValueError, tarinfo.tobuf, tarfile.GNU_FORMAT) def test_pax_limits(self): - # A 256 char name that can be stored without an extended header. - tarinfo = tarfile.TarInfo("123/" * 62 + "longname") - self.assert_(len(tarinfo.create_pax_header("utf8")) == 512, - "create_pax_header attached superfluous extended header") - tarinfo = tarfile.TarInfo("123/" * 126 + "longname") - tarinfo.create_pax_header("utf8") + tarinfo.tobuf(tarfile.PAX_FORMAT) tarinfo = tarfile.TarInfo("longlink") tarinfo.linkname = "123/" * 126 + "longname" - tarinfo.create_pax_header("utf8") + tarinfo.tobuf(tarfile.PAX_FORMAT) tarinfo = tarfile.TarInfo("name") tarinfo.uid = 04000000000000000000 - tarinfo.create_pax_header("utf8") + tarinfo.tobuf(tarfile.PAX_FORMAT) class GzipMiscReadTest(MiscReadTest): @@ -940,6 +1053,9 @@ StreamWriteTest, GNUWriteTest, PaxWriteTest, + UstarUnicodeTest, + GNUUnicodeTest, + PaxUnicodeTest, AppendTest, LimitsTest, ] Modified: python/branches/cpy_merge/Lib/test/test_tokenize.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_tokenize.py (original) +++ python/branches/cpy_merge/Lib/test/test_tokenize.py Tue Jun 5 01:44:17 2007 @@ -19,7 +19,7 @@ >>> dump_tokens("if False:\\n" ... " # NL\\n" -... " True = False # NEWLINE\\n") +... " a = False # NEWLINE\\n") NAME 'if' (1, 0) (1, 2) NAME 'False' (1, 3) (1, 8) OP ':' (1, 8) (1, 9) @@ -27,7 +27,7 @@ COMMENT '# NL' (2, 4) (2, 8) NL '\\n' (2, 8) (2, 9) INDENT ' ' (3, 0) (3, 4) -NAME 'True' (3, 4) (3, 8) +NAME 'a' (3, 4) (3, 5) OP '=' (3, 9) (3, 10) NAME 'False' (3, 11) (3, 16) COMMENT '# NEWLINE' (3, 17) (3, 26) Modified: python/branches/cpy_merge/Lib/test/test_traceback.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_traceback.py (original) +++ python/branches/cpy_merge/Lib/test/test_traceback.py Tue Jun 5 01:44:17 2007 @@ -52,58 +52,13 @@ self.assert_("^" in err[2]) self.assert_(err[1].find(")") == err[2].find("^")) - def test_bug737473(self): - import sys, os, tempfile, time - - savedpath = sys.path[:] - testdir = tempfile.mkdtemp() - try: - sys.path.insert(0, testdir) - testfile = os.path.join(testdir, 'test_bug737473.py') - print(""" -def test(): - raise ValueError""", file=open(testfile, 'w')) - - if 'test_bug737473' in sys.modules: - del sys.modules['test_bug737473'] - import test_bug737473 - - try: - test_bug737473.test() - except ValueError: - # this loads source code to linecache - traceback.extract_tb(sys.exc_traceback) - - # If this test runs too quickly, test_bug737473.py's mtime - # attribute will remain unchanged even if the file is rewritten. - # Consequently, the file would not reload. So, added a sleep() - # delay to assure that a new, distinct timestamp is written. - # Since WinME with FAT32 has multisecond resolution, more than - # three seconds are needed for this test to pass reliably :-( - time.sleep(4) - - print(""" -def test(): - raise NotImplementedError""", file=open(testfile, 'w')) - reload(test_bug737473) - try: - test_bug737473.test() - except NotImplementedError: - src = traceback.extract_tb(sys.exc_traceback)[-1][-1] - self.failUnlessEqual(src, 'raise NotImplementedError') - finally: - sys.path[:] = savedpath - for f in os.listdir(testdir): - os.unlink(os.path.join(testdir, f)) - os.rmdir(testdir) - def test_members(self): # Covers Python/structmember.c::listmembers() try: 1/0 except: import sys - sys.exc_traceback.__members__ + sys.exc_info()[2].__members__ def test_base_exception(self): # Test that exceptions derived from BaseException are formatted right Modified: python/branches/cpy_merge/Lib/test/test_urllib.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_urllib.py (original) +++ python/branches/cpy_merge/Lib/test/test_urllib.py Tue Jun 5 01:44:17 2007 @@ -8,6 +8,10 @@ import mimetools import tempfile import StringIO +import ftplib +import threading +import socket +import time def hexescape(char): """Escape char as RFC 2396 specifies""" @@ -541,6 +545,76 @@ "url2pathname() failed; %s != %s" % (expect, result)) +# Just commented them out. +# Can't really tell why keep failing in windows and sparc. +# Everywhere else they work ok, but on those machines, someteimes +# fail in one of the tests, sometimes in other. I have a linux, and +# the tests go ok. +# If anybody has one of the problematic enviroments, please help! +# . Facundo +# +# def server(evt): +# serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +# serv.settimeout(3) +# serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) +# serv.bind(("", 9093)) +# serv.listen(5) +# try: +# conn, addr = serv.accept() +# conn.send("1 Hola mundo\n") +# cantdata = 0 +# while cantdata < 13: +# data = conn.recv(13-cantdata) +# cantdata += len(data) +# time.sleep(.3) +# conn.send("2 No more lines\n") +# conn.close() +# except socket.timeout: +# pass +# finally: +# serv.close() +# evt.set() +# +# class FTPWrapperTests(unittest.TestCase): +# +# def setUp(self): +# ftplib.FTP.port = 9093 +# self.evt = threading.Event() +# threading.Thread(target=server, args=(self.evt,)).start() +# time.sleep(.1) +# +# def tearDown(self): +# self.evt.wait() +# +# def testBasic(self): +# # connects +# ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) +# ftp.ftp.sock.close() +# +# def testTimeoutDefault(self): +# # default +# ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) +# self.assertTrue(ftp.ftp.sock.gettimeout() is None) +# ftp.ftp.sock.close() +# +# def testTimeoutValue(self): +# # a value +# ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, [], timeout=30) +# self.assertEqual(ftp.ftp.sock.gettimeout(), 30) +# ftp.ftp.sock.close() +# +# def testTimeoutNone(self): +# # None, having other default +# previous = socket.getdefaulttimeout() +# socket.setdefaulttimeout(30) +# try: +# ftp = urllib.ftpwrapper("myuser", "mypass", "localhost", 9093, []) +# finally: +# socket.setdefaulttimeout(previous) +# self.assertEqual(ftp.ftp.sock.gettimeout(), 30) +# ftp.ftp.close() +# + def test_main(): @@ -551,7 +625,8 @@ QuotingTests, UnquotingTests, urlencode_Tests, - Pathname_Tests + Pathname_Tests, + #FTPWrapperTests, ) Modified: python/branches/cpy_merge/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_xmlrpc.py (original) +++ python/branches/cpy_merge/Lib/test/test_xmlrpc.py Tue Jun 5 01:44:17 2007 @@ -17,7 +17,7 @@ 'ashortlong': 2, 'anotherlist': ['.zyx.41'], 'abase64': xmlrpclib.Binary("my dog has fleas"), - 'boolean': xmlrpclib.False, + 'boolean': False, 'unicode': u'\u4000\u6000\u8000', u'ukey\u4000': 'regular value', 'datetime1': xmlrpclib.DateTime('20050210T11:41:23'), @@ -133,10 +133,11 @@ """ # sys.setdefaultencoding() normally doesn't exist after site.py is - # loaded. reload(sys) is the way to get it back. + # loaded. Re-initializing sys again is the way to get it back. :-( old_encoding = sys.getdefaultencoding() setdefaultencoding_existed = hasattr(sys, "setdefaultencoding") - reload(sys) # ugh! + import imp + imp.init_builtin('sys') sys.setdefaultencoding("iso-8859-1") try: (s, d), m = xmlrpclib.loads(utf8) Modified: python/branches/cpy_merge/Lib/test/test_zipfile.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_zipfile.py (original) +++ python/branches/cpy_merge/Lib/test/test_zipfile.py Tue Jun 5 01:44:17 2007 @@ -712,7 +712,7 @@ for n, s in enumerate(self.seps): self.arcdata[s] = s.join(self.line_gen) + s self.arcfiles[s] = '%s-%d' % (TESTFN, n) - file(self.arcfiles[s], "wb").write(self.arcdata[s]) + open(self.arcfiles[s], "wb").write(self.arcdata[s]) def makeTestArchive(self, f, compression): # Create the ZIP archive Modified: python/branches/cpy_merge/Lib/test/testtar.tar ============================================================================== Binary files. No diff available. Modified: python/branches/cpy_merge/Lib/textwrap.py ============================================================================== --- python/branches/cpy_merge/Lib/textwrap.py (original) +++ python/branches/cpy_merge/Lib/textwrap.py Tue Jun 5 01:44:17 2007 @@ -9,14 +9,6 @@ import string, re -# Do the right thing with boolean values for all known Python versions -# (so this module can be copied to projects that don't depend on Python -# 2.3, e.g. Optik and Docutils). -try: - True, False -except NameError: - (True, False) = (1, 0) - __all__ = ['TextWrapper', 'wrap', 'fill'] # Hardcode the recognized whitespace characters to the US-ASCII Modified: python/branches/cpy_merge/Lib/unittest.py ============================================================================== --- python/branches/cpy_merge/Lib/unittest.py (original) +++ python/branches/cpy_merge/Lib/unittest.py Tue Jun 5 01:44:17 2007 @@ -65,22 +65,6 @@ ############################################################################## -# Backward compatibility -############################################################################## -if sys.version_info[:2] < (2, 2): - False, True = 0, 1 - def isinstance(obj, clsinfo): - import __builtin__ - if type(clsinfo) in (tuple, list): - for cls in clsinfo: - if cls is type: cls = types.ClassType - if __builtin__.isinstance(obj, cls): - return 1 - return 0 - else: return __builtin__.isinstance(obj, clsinfo) - - -############################################################################## # Test framework core ############################################################################## Modified: python/branches/cpy_merge/Lib/urllib.py ============================================================================== --- python/branches/cpy_merge/Lib/urllib.py (original) +++ python/branches/cpy_merge/Lib/urllib.py Tue Jun 5 01:44:17 2007 @@ -817,19 +817,20 @@ class ftpwrapper: """Class used by open_ftp() for cache of open FTP connections.""" - def __init__(self, user, passwd, host, port, dirs): + def __init__(self, user, passwd, host, port, dirs, timeout=None): self.user = user self.passwd = passwd self.host = host self.port = port self.dirs = dirs + self.timeout = timeout self.init() def init(self): import ftplib self.busy = 0 self.ftp = ftplib.FTP() - self.ftp.connect(self.host, self.port) + self.ftp.connect(self.host, self.port, self.timeout) self.ftp.login(self.user, self.passwd) for dir in self.dirs: self.ftp.cwd(dir) Modified: python/branches/cpy_merge/Lib/uuid.py ============================================================================== --- python/branches/cpy_merge/Lib/uuid.py (original) +++ python/branches/cpy_merge/Lib/uuid.py Tue Jun 5 01:44:17 2007 @@ -535,8 +535,8 @@ def uuid3(namespace, name): """Generate a UUID from the MD5 hash of a namespace UUID and a name.""" - import hashlib - hash = hashlib.md5(namespace.bytes + name).digest() + from hashlib import md5 + hash = md5(namespace.bytes + name).digest() return UUID(bytes=hash[:16], version=3) def uuid4(): @@ -558,8 +558,8 @@ def uuid5(namespace, name): """Generate a UUID from the SHA-1 hash of a namespace UUID and a name.""" - import sha - hash = sha.sha(namespace.bytes + name).digest() + from hashlib import sha1 + hash = sha1(namespace.bytes + name).digest() return UUID(bytes=hash[:16], version=5) # The following standard UUIDs are for use with uuid3() or uuid5(). Modified: python/branches/cpy_merge/Lib/wsgiref/handlers.py ============================================================================== --- python/branches/cpy_merge/Lib/wsgiref/handlers.py (original) +++ python/branches/cpy_merge/Lib/wsgiref/handlers.py Tue Jun 5 01:44:17 2007 @@ -8,23 +8,6 @@ __all__ = ['BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler'] -try: - dict -except NameError: - def dict(items): - d = {} - for k,v in items: - d[k] = v - return d - -try: - True - False -except NameError: - True = not None - False = not True - - # Weekday and month names for HTTP date/time formatting; always English! _weekdayname = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] _monthname = [None, # Dummy so we can use 1-based month numbers Modified: python/branches/cpy_merge/Lib/xmlrpclib.py ============================================================================== --- python/branches/cpy_merge/Lib/xmlrpclib.py (original) +++ python/branches/cpy_merge/Lib/xmlrpclib.py Tue Jun 5 01:44:17 2007 @@ -283,8 +283,6 @@ # all other values are interpreted as False. boolean = Boolean = bool -# to avoid breaking code which references xmlrpclib.{True,False} -True, False = True, False ## # Wrapper for XML-RPC DateTime values. This converts a time value to Modified: python/branches/cpy_merge/Misc/BeOS-setup.py ============================================================================== --- python/branches/cpy_merge/Misc/BeOS-setup.py (original) +++ python/branches/cpy_merge/Misc/BeOS-setup.py Tue Jun 5 01:44:17 2007 @@ -168,8 +168,6 @@ if platform in ['Darwin1.2', 'beos']: math_libs = [] - # XXX Omitted modules: gl, pure, dl, SGI-specific modules - # # The following modules are all pretty straightforward, and compile # on pretty much any POSIXish platform. @@ -242,9 +240,6 @@ # Lance Ellinghaus's syslog daemon interface exts.append( Extension('syslog', ['syslogmodule.c']) ) - # George Neville-Neil's timing module: - exts.append( Extension('timing', ['timingmodule.c']) ) - # # Here ends the simple stuff. From here on, modules need certain # libraries, are platform-specific, or present other surprises. @@ -340,15 +335,8 @@ if self.compiler.find_library_file(lib_dirs, 'db'): dblib = ['db'] - db185_incs = find_file('db_185.h', inc_dirs, - ['/usr/include/db3', '/usr/include/db2']) db_inc = find_file('db.h', inc_dirs, ['/usr/include/db1']) - if db185_incs is not None: - exts.append( Extension('bsddb', ['bsddbmodule.c'], - include_dirs = db185_incs, - define_macros=[('HAVE_DB_185_H',1)], - libraries = dblib ) ) - elif db_inc is not None: + db_inc is not None: exts.append( Extension('bsddb', ['bsddbmodule.c'], include_dirs = db_inc, libraries = dblib) ) Modified: python/branches/cpy_merge/Misc/NEWS ============================================================================== --- python/branches/cpy_merge/Misc/NEWS (original) +++ python/branches/cpy_merge/Misc/NEWS Tue Jun 5 01:44:17 2007 @@ -26,6 +26,8 @@ Core and Builtins ----------------- +- None, True, False are now keywords. + - PEP 3119: isinstance() and issubclass() can be overridden. - Remove BaseException.message. @@ -137,7 +139,7 @@ backticks (ie, `x`), <> - Removed these Python builtins: - apply(), callable(), coerce(), file(), reduce() + apply(), callable(), coerce(), file(), reduce(), reload() - Removed these Python methods: {}.has_key @@ -163,6 +165,7 @@ - Removed these attributes from Python modules: * operator module: div, idiv, __div__, __idiv__, isCallable, sequenceIncludes + * sys module: exc_clear(), exc_type, exc_value, exc_traceback Library @@ -172,8 +175,8 @@ AST -> bytecode mechanism. - Removed these modules: - * Bastion, bsddb185, exceptions, md5, popen2, rexec, - sets, sha, stringold, strop, xmllib + * Bastion, bsddb185, exceptions, md5, MimeWriter, mimify, popen2, rexec, + sets, sha, stringold, strop, timing, xmllib. - Remove obsolete IRIX modules: al/AL, cd/CD, cddb, cdplayer, cl/CL, DEVICE, ERRNO, FILE, fl/FL, flp, fm, GET, gl/GL, GLWS, IN, imgfile, IOCTL, jpeg, @@ -223,6 +226,9 @@ Mac --- +- The cfmfile was removed. + + New platforms ------------- Modified: python/branches/cpy_merge/Misc/build.sh ============================================================================== --- python/branches/cpy_merge/Misc/build.sh (original) +++ python/branches/cpy_merge/Misc/build.sh Tue Jun 5 01:44:17 2007 @@ -170,6 +170,7 @@ start=`current_time` make install >& build/$F update_status "Installing" "$F" $start + mail_on_failure "install" build/$F if [ ! -x $PYTHON ]; then ln -s ${PYTHON}3.* $PYTHON Modified: python/branches/cpy_merge/Misc/cheatsheet ============================================================================== --- python/branches/cpy_merge/Misc/cheatsheet (original) +++ python/branches/cpy_merge/Misc/cheatsheet Tue Jun 5 01:44:17 2007 @@ -41,6 +41,7 @@ -h print this help message and exit -i Inspect interactively after running script (also PYTHONINSPECT=x) and force prompts, even if stdin appears not to be a terminal +-m mod run library module as a script (terminates option list -O optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x) -OO remove doc-strings in addition to the -O optimizations -Q arg division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew @@ -926,7 +927,6 @@ abs(x) Return the absolute value of number x. bool(x) Returns True when the argument x is true and False otherwise. buffer(obj) Creates a buffer reference to an object. -callable(x) Returns True if x callable, else False. chr(i) Returns one-character string whose ASCII code isinteger i classmethod(f) Converts a function f, into a method with the class as the first argument. Useful for creating alternative constructors. @@ -934,14 +934,14 @@ compile(string, from which the code was read, or eg. ''if not read filename, kind) from file.kind can be 'eval' if string is a single stmt, or 'single' which prints the output of expression statements - thatevaluate to something else than None, or be 'exec'. + that evaluate to something else than None, or be 'exec'. complex(real[, Builds a complex object (can also be done using J or j image]) suffix,e.g. 1+3J) delattr(obj, name) deletes attribute named name of object obj <=> del obj.name If no args, returns the list of names in current dict([items]) Create a new dictionary from the specified item list. -dir([object]) localsymbol table. With a module, class or class - instanceobject as arg, returns list of names in its attr. +dir([object]) local symbol table. With a module, class or class + instance object as arg, returns list of names in its attr. dict. divmod(a,b) Returns tuple of (a/b, a%b) enumerate(seq) Return a iterator giving: (0, seq[0]), (1, seq[1]), ... @@ -956,7 +956,7 @@ float(x) Converts a number or a string to floating point. getattr(object, [ arg added in 1.5.2]Gets attribute called name name[, default])) from object,e.g. getattr(x, 'f') <=> x.f). If not found, - raisesAttributeError or returns default if specified. + raises AttributeError or returns default if specified. globals() Returns a dictionary containing current global variables. hasattr(object, Returns true if object has attr called name. name) @@ -966,9 +966,7 @@ id(object) Returns a unique 'identity' integer for an object. int(x[, base]) base paramenter specifies base from which to convert string values. -intern(aString) Enters aString in the table of "interned strings" - andreturns the string. Interned strings are 'immortals'. -isinstance(obj, returns true if obj is an instance of class. Ifissubclass +isinstance(obj, Returns true if obj is an instance of class. Ifissubclass class) (A,B) then isinstance(x,A) => isinstance(x,B) issubclass(class1, returns true if class1 is derived from class2 class2) @@ -1001,26 +999,24 @@ [, buffering]]) pow(x, y [, z]) Returns x to power y [modulo z]. See also ** operator. property() Created a property with access controlled by functions. -range(start [,end Returns list of ints from >= start and < end.With 1 arg, -[, step]]) list from 0..arg-1With 2 args, list from start..end-1With 3 - args, list from start up to end by step -reload(module) after fixing it. If module was syntacticallycorrect but had - an error in initialization, mustimport it one more time - before calling reload(). - Returns a string containing a printable and if possible -repr(object) evaluable representation of an object. +range(start [,end Returns list of ints from >= start and < end. With 1 arg, +[, step]]) list from 0..arg-1. With 2 args, list from start..end-1. + With 3 args, list from start up to end by step + after fixing it. +repr(object) Returns a string containing a printable and if possible + evaluable representation of an object. Class redefinable (__repr__). See also str(). round(x, n=0) Returns the floating point value x rounded to n digitsafter the decimal point. -setattr(object, This is the counterpart of getattr().setattr(o, 'foobar', -name, value) 3) <=> o.foobar = 3Creates attribute if it doesn't exist! +setattr(object, This is the counterpart of getattr(). setattr(o, 'foobar', +name, value) 3) <=> o.foobar = 3. Creates attribute if it doesn't exist! slice([start,] stop Returns a slice object representing a range, with R/ -[, step]) Oattributes: start, stop, step. - Returns a string containing a nicely +[, step]) O attributes: start, stop, step. staticmethod() Convert a function to method with no self or class argument. Useful for methods associated with a class that do not need access to an object's internal state. -str(object) printablerepresentation of an object. Class overridable +str(object) Returns a string containing a nicely + printable representation of an object. Class overridable (__str__).See also repr(). super(type) Create an unbound super object. Used to call cooperative superclass methods. @@ -1042,12 +1038,8 @@ vars([object]) instance object as argumentreturns a dictionary corresponding to the object'ssymbol table. Useful with "%" formatting operator. -xrange(start [, end Like range(), but doesn't actually store entire listall at -[, step]]) once. Good to use in "for" loops when there is abig range - and little memory. -zip(seq1[, seq2, Returns a list of tuples where each tuple contains the nth -...]) element of each of the argument sequences. - +zip(seq1[, seq2, Returns an iterator of tuples where each tuple contains +...]) the nth element of each of the argument sequences. @@ -1314,10 +1306,6 @@ in C that are linked into this interpreter. check_interval How often to check for thread switches or signals(measured in number of virtual machine instructions) -exc_type, exc_value, Deprecated since release 1.5. Use exc_info() instead. -exc_traceback -exitfunc User can set to a parameterless fcn. It will getcalled - before interpreter exits. last_type, Set only when an exception not handled andinterpreter last_value, prints an error. Used by debuggers. last_traceback @@ -1350,7 +1338,7 @@ setprofile(func) Sets a profile function for performance profiling. Info on exception currently being handled; this is atuple (exc_type, exc_value, exc_traceback).Warning: assigning the -exc_info() traceback return value to a loca variable in a +exc_info() traceback return value to a local variable in a function handling an exception will cause a circular reference. setdefaultencoding Change default Unicode encoding - defaults to 7-bit ASCII. @@ -1857,7 +1845,6 @@ dumbdbm A dumb and slow but simple dbm clone. [DEL:dump:DEL] [DEL:Print python code that reconstructs a variable.:DEL] email Comprehensive support for internet email. -exceptions Class based built-in exception hierarchy. filecmp File comparison. fileinput Helper class to quickly write a loop over all standard input files. @@ -1872,7 +1859,6 @@ www.pauahtun.org/pub/getargspy.zip getpass Utilities to get a password and/or the current user name. glob filename globbing. -gopherlib Gopher protocol client interface. [DEL:grep:DEL] [DEL:'grep' utilities.:DEL] gzip Read & write gzipped files. heapq Priority queue implemented using lists organized as heaps. @@ -1887,7 +1873,6 @@ imputil Privides a way of writing customised import hooks. inspect Tool for probing live Python objects. keyword List of Python keywords. -knee A Python re-implementation of hierarchical module import. linecache Cache lines from files. linuxaudiodev Lunix /dev/audio support. locale Support for number formatting using the current locale @@ -1900,8 +1885,6 @@ mhlib MH (mailbox) interface. mimetools Various tools used by MIME-reading or MIME-writing programs. mimetypes Guess the MIME type of a file. -MimeWriter Generic MIME writer. -mimify Mimification and unmimification of mail messages. mmap Interface to memory-mapped files - they behave like mutable strings./font> multifile Class to make multi-file messages easier to handle. @@ -1920,7 +1903,6 @@ pipes Conversion pipeline templates. pkgunil Utilities for working with Python packages. poplib A POP3 client class. Based on the J. Myers POP3 draft. -posixfile Extended (posix) file operations. posixpath Common operations on POSIX pathnames. pprint Support to pretty-print lists, tuples, & dictionaries recursively. @@ -1933,7 +1915,6 @@ pyclbr Parse a Python file and retrieve classes and methods. Queue A multi-producer, multi-consumer queue. quopri Conversions to/from quoted-printable transport encoding. -rand Don't use unless you want compatibility with C's rand(). random Random variable generators re Regular Expressions. repr Redo repr() but with limits on most sizes. @@ -1942,7 +1923,6 @@ rlcompleter Word completion for GNU readline 2.0. robotparser Parse robots.txt files, useful for web spiders. sched A generally useful event scheduler class. -sets Module for a set datatype. sgmllib A parser for SGML. shelve Manage shelves of pickled objects. shlex Lexical analyzer class for simple shell-like syntaxes. @@ -1954,7 +1934,6 @@ sndhdr Several routines that help recognizing sound. SocketServer Generic socket server classes. stat Constants and functions for interpreting stat/lstat struct. -statcache Maintain a cache of file stats. statvfs Constants for interpreting statvfs struct as returned by os.statvfs()and os.fstatvfs() (if they exist). string A collection of string operations. Modified: python/branches/cpy_merge/Modules/Setup.dist ============================================================================== --- python/branches/cpy_merge/Modules/Setup.dist (original) +++ python/branches/cpy_merge/Modules/Setup.dist Tue Jun 5 01:44:17 2007 @@ -246,11 +246,6 @@ #linuxaudiodev linuxaudiodev.c -# George Neville-Neil's timing module: - -#timing timingmodule.c - - # The _tkinter module. # # The command for _tkinter is long and site specific. Please Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Tue Jun 5 01:44:17 2007 @@ -28,7 +28,7 @@ { char *n; const char *str_end; - Py_ssize_t l; + Py_ssize_t len; /* XXX: Should we ckeck here if the object is closed, for thread-safety? */ @@ -43,31 +43,31 @@ n++; /* Get the length from the current position to the end of the line. */ - l = n - (self->buf + self->pos); + len = n - (self->buf + self->pos); *output = self->buf + self->pos; - assert(self->pos + l < PY_SSIZE_T_MAX); - assert(l >= 0); - self->pos += l; + assert(self->pos + len < PY_SSIZE_T_MAX); + assert(len >= 0); + self->pos += len; - return l; + return len; } /* Internal routine for writing a string of bytes to the buffer of a BytesIO object. Returns the number of bytes wrote. */ static Py_ssize_t -write_bytes(BytesIOObject *self, const char *bytes, Py_ssize_t l) +write_bytes(BytesIOObject *self, const char *bytes, Py_ssize_t len) { - Py_ssize_t newl; + Py_ssize_t new_len; assert(self->buf != NULL); - newl = self->pos + l; - if (newl >= self->buf_size) { + new_len = self->pos + len; + if (new_len >= self->buf_size) { self->buf_size *= 2; - if (self->buf_size <= newl) { - assert(newl + 1 < PY_SSIZE_T_MAX); - self->buf_size = newl + 1; + if (self->buf_size <= new_len) { + assert(new_len + 1 < PY_SSIZE_T_MAX); + self->buf_size = new_len + 1; } PyMem_Resize(self->buf, char, self->buf_size); @@ -79,16 +79,16 @@ } } - memcpy(self->buf + self->pos, bytes, l); + memcpy(self->buf + self->pos, bytes, len); - assert(self->pos + l < PY_SSIZE_T_MAX); - self->pos += l; + assert(self->pos + len < PY_SSIZE_T_MAX); + self->pos += len; if (self->string_size < self->pos) { self->string_size = self->pos; } - return l; + return len; } @@ -143,7 +143,7 @@ static PyObject * bytes_io_read(BytesIOObject *self, PyObject *args) { - Py_ssize_t l, n = -1; + Py_ssize_t len, n = -1; char *output; if (self->buf == NULL) @@ -154,8 +154,8 @@ /* adjust invalid sizes */ l = self->string_size - self->pos; - if (n < 0 || n > l) { - n = l; + if (n < 0 || n > len) { + n = len; if (n < 0) n = 0; } @@ -169,21 +169,21 @@ static PyObject * bytes_io_readline(BytesIOObject *self, PyObject *args) { - Py_ssize_t n, m = -1; + Py_ssize_t n, size = -1; char *output; if (self->buf == NULL) return err_closed(); - if (!PyArg_ParseTuple(args, "|i:readline", &m)) + if (!PyArg_ParseTuple(args, "|i:readline", &size)) return NULL; n = get_line(self, &output); - if (m >= 0 && m < n) { - m = n - m; - n -= m; - self->pos -= m; + if (size >= 0 && size < n) { + size = n - size; + n -= size; + self->pos -= size; } return PyString_FromStringAndSize(output, n); @@ -192,14 +192,14 @@ static PyObject * bytes_io_readlines(BytesIOObject *self, PyObject *args) { - Py_ssize_t n, hint = 0, length = 0; + Py_ssize_t n, size = 0, len = 0; PyObject *result, *line; char *output; if (self->buf == NULL) return err_closed(); - if (!PyArg_ParseTuple(args, "|i:readlines", &hint)) + if (!PyArg_ParseTuple(args, "|i:readlines", &size)) return NULL; result = PyList_New(0); @@ -219,8 +219,8 @@ goto err; } Py_DECREF(line); - length += n; - if (hint > 0 && length >= hint) + len += n; + if (size > 0 && len >= size) break; } return result; Modified: python/branches/cpy_merge/Modules/_ctypes/callbacks.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/callbacks.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/callbacks.c Tue Jun 5 01:44:17 2007 @@ -385,8 +385,8 @@ } { - PyObject *py_rclsid = PyLong_FromVoidPtr(rclsid); - PyObject *py_riid = PyLong_FromVoidPtr(riid); + PyObject *py_rclsid = PyLong_FromVoidPtr((void *)rclsid); + PyObject *py_riid = PyLong_FromVoidPtr((void *)riid); PyObject *py_ppv = PyLong_FromVoidPtr(ppv); if (!py_rclsid || !py_riid || !py_ppv) { Py_XDECREF(py_rclsid); Deleted: /python/branches/cpy_merge/Modules/cstubs ============================================================================== --- /python/branches/cpy_merge/Modules/cstubs Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,1362 +0,0 @@ - -/* -Input used to generate the Python module "glmodule.c". -The stub generator is a Python script called "cgen.py". - -Each definition must be contained on one line: - - - - can be: void, short, long (XXX maybe others?) - - can be: char, string, short, float, long, or double - string indicates a null terminated string; - if is char and begins with a *, the * is stripped - and is changed into string - - has the form or [] - where can be - s: arg is sent - r: arg is received (arg is a pointer) - and can be (N and I are numbers): - N - argI - retval - N*argI - N*I - N*retval - In the case where the subscript consists of two parts - separated by *, the first part is the width of the matrix, and - the second part is the length of the matrix. This order is - opposite from the order used in C to declare a two-dimensional - matrix. -*/ - -/* - * An attempt has been made to make this module switch threads on qread - * calls. It is far from safe, though. - */ - -#include -#include - -#ifdef __sgi -extern int devport(); -extern int textwritemask(); -extern int pagewritemask(); -extern int gewrite(); -extern int gettp(); -#endif - -#include "Python.h" -#include "cgensupport.h" - -/* -Some stubs are too complicated for the stub generator. -We can include manually written versions of them here. -A line starting with '%' gives the name of the function so the stub -generator can include it in the table of functions. -*/ - -% qread - -static PyObject * -gl_qread(self, args) - PyObject *self; - PyObject *args; -{ - long retval; - short arg1 ; - Py_BEGIN_ALLOW_THREADS - retval = qread( & arg1 ); - Py_END_ALLOW_THREADS - { PyObject *v = PyTuple_New( 2 ); - if (v == NULL) return NULL; - PyTuple_SetItem(v, 0, mknewlongobject(retval)); - PyTuple_SetItem(v, 1, mknewshortobject(arg1)); - return v; - } -} - - -/* -varray -- an array of v.. calls. -The argument is an array (maybe list or tuple) of points. -Each point must be a tuple or list of coordinates (x, y, z). -The points may be 2- or 3-dimensional but must all have the -same dimension. Float and int values may be mixed however. -The points are always converted to 3D double precision points -by assuming z=0.0 if necessary (as indicated in the man page), -and for each point v3d() is called. -*/ - -% varray - -static PyObject * -gl_varray(self, args) - PyObject *self; - PyObject *args; -{ - PyObject *v, *w=NULL; - int i, n, width; - double vec[3]; - PyObject * (*getitem)(PyObject *, int); - - if (!PyArg_GetObject(args, 1, 0, &v)) - return NULL; - - if (PyList_Check(v)) { - n = PyList_Size(v); - getitem = PyList_GetItem; - } - else if (PyTuple_Check(v)) { - n = PyTuple_Size(v); - getitem = PyTuple_GetItem; - } - else { - PyErr_BadArgument(); - return NULL; - } - - if (n == 0) { - Py_INCREF(Py_None); - return Py_None; - } - if (n > 0) - w = (*getitem)(v, 0); - - width = 0; - if (w == NULL) { - } - else if (PyList_Check(w)) { - width = PyList_Size(w); - } - else if (PyTuple_Check(w)) { - width = PyTuple_Size(w); - } - - switch (width) { - case 2: - vec[2] = 0.0; - /* Fall through */ - case 3: - break; - default: - PyErr_BadArgument(); - return NULL; - } - - for (i = 0; i < n; i++) { - w = (*getitem)(v, i); - if (!PyArg_GetDoubleArray(w, 1, 0, width, vec)) - return NULL; - v3d(vec); - } - - Py_INCREF(Py_None); - return Py_None; -} - -/* -vnarray, nvarray -- an array of n3f and v3f calls. -The argument is an array (list or tuple) of pairs of points and normals. -Each pair is a tuple (NOT a list) of a point and a normal for that point. -Each point or normal must be a tuple (NOT a list) of coordinates (x, y, z). -Three coordinates must be given. Float and int values may be mixed. -For each pair, n3f() is called for the normal, and then v3f() is called -for the vector. - -vnarray and nvarray differ only in the order of the vector and normal in -the pair: vnarray expects (v, n) while nvarray expects (n, v). -*/ - -static PyObject *gen_nvarray(); /* Forward */ - -% nvarray - -static PyObject * -gl_nvarray(self, args) - PyObject *self; - PyObject *args; -{ - return gen_nvarray(args, 0); -} - -% vnarray - -static PyObject * -gl_vnarray(self, args) - PyObject *self; - PyObject *args; -{ - return gen_nvarray(args, 1); -} - -/* Generic, internal version of {nv,nv}array: inorm indicates the - argument order, 0: normal first, 1: vector first. */ - -static PyObject * -gen_nvarray(args, inorm) - PyObject *args; - int inorm; -{ - PyObject *v, *w, *wnorm, *wvec; - int i, n; - float norm[3], vec[3]; - PyObject * (*getitem)(PyObject *, int); - - if (!PyArg_GetObject(args, 1, 0, &v)) - return NULL; - - if (PyList_Check(v)) { - n = PyList_Size(v); - getitem = PyList_GetItem; - } - else if (PyTuple_Check(v)) { - n = PyTuple_Size(v); - getitem = PyTuple_GetItem; - } - else { - PyErr_BadArgument(); - return NULL; - } - - for (i = 0; i < n; i++) { - w = (*getitem)(v, i); - if (!PyTuple_Check(w) || PyTuple_Size(w) != 2) { - PyErr_BadArgument(); - return NULL; - } - wnorm = PyTuple_GetItem(w, inorm); - wvec = PyTuple_GetItem(w, 1 - inorm); - if (!PyArg_GetFloatArray(wnorm, 1, 0, 3, norm) || - !PyArg_GetFloatArray(wvec, 1, 0, 3, vec)) - return NULL; - n3f(norm); - v3f(vec); - } - - Py_INCREF(Py_None); - return Py_None; -} - -/* nurbssurface(s_knots[], t_knots[], ctl[][], s_order, t_order, type). - The dimensions of ctl[] are computed as follows: - [len(s_knots) - s_order], [len(t_knots) - t_order] -*/ - -% nurbssurface - -static PyObject * -gl_nurbssurface(self, args) - PyObject *self; - PyObject *args; -{ - long arg1 ; - double * arg2 ; - long arg3 ; - double * arg4 ; - double *arg5 ; - long arg6 ; - long arg7 ; - long arg8 ; - long ncoords; - long s_byte_stride, t_byte_stride; - long s_nctl, t_nctl; - long s, t; - PyObject *v, *w, *pt; - double *pnext; - if (!PyArg_GetLongArraySize(args, 6, 0, &arg1)) - return NULL; - if ((arg2 = PyMem_NEW(double, arg1 )) == NULL) { - return PyErr_NoMemory(); - } - if (!PyArg_GetDoubleArray(args, 6, 0, arg1 , arg2)) - return NULL; - if (!PyArg_GetLongArraySize(args, 6, 1, &arg3)) - return NULL; - if ((arg4 = PyMem_NEW(double, arg3 )) == NULL) { - return PyErr_NoMemory(); - } - if (!PyArg_GetDoubleArray(args, 6, 1, arg3 , arg4)) - return NULL; - if (!PyArg_GetLong(args, 6, 3, &arg6)) - return NULL; - if (!PyArg_GetLong(args, 6, 4, &arg7)) - return NULL; - if (!PyArg_GetLong(args, 6, 5, &arg8)) - return NULL; - if (arg8 == N_XYZ) - ncoords = 3; - else if (arg8 == N_XYZW) - ncoords = 4; - else { - PyErr_BadArgument(); - return NULL; - } - s_nctl = arg1 - arg6; - t_nctl = arg3 - arg7; - if (!PyArg_GetObject(args, 6, 2, &v)) - return NULL; - if (!PyList_Check(v) || PyList_Size(v) != s_nctl) { - PyErr_BadArgument(); - return NULL; - } - if ((arg5 = PyMem_NEW(double, s_nctl*t_nctl*ncoords )) == NULL) { - return PyErr_NoMemory(); - } - pnext = arg5; - for (s = 0; s < s_nctl; s++) { - w = PyList_GetItem(v, s); - if (w == NULL || !PyList_Check(w) || - PyList_Size(w) != t_nctl) { - PyErr_BadArgument(); - return NULL; - } - for (t = 0; t < t_nctl; t++) { - pt = PyList_GetItem(w, t); - if (!PyArg_GetDoubleArray(pt, 1, 0, ncoords, pnext)) - return NULL; - pnext += ncoords; - } - } - s_byte_stride = sizeof(double) * ncoords; - t_byte_stride = s_byte_stride * s_nctl; - nurbssurface( arg1 , arg2 , arg3 , arg4 , - s_byte_stride , t_byte_stride , arg5 , arg6 , arg7 , arg8 ); - PyMem_DEL(arg2); - PyMem_DEL(arg4); - PyMem_DEL(arg5); - Py_INCREF(Py_None); - return Py_None; -} - -/* nurbscurve(knots, ctlpoints, order, type). - The length of ctlpoints is len(knots)-order. */ - -%nurbscurve - -static PyObject * -gl_nurbscurve(self, args) - PyObject *self; - PyObject *args; -{ - long arg1 ; - double * arg2 ; - long arg3 ; - double * arg4 ; - long arg5 ; - long arg6 ; - int ncoords, npoints; - int i; - PyObject *v; - double *pnext; - if (!PyArg_GetLongArraySize(args, 4, 0, &arg1)) - return NULL; - if ((arg2 = PyMem_NEW(double, arg1 )) == NULL) { - return PyErr_NoMemory(); - } - if (!PyArg_GetDoubleArray(args, 4, 0, arg1 , arg2)) - return NULL; - if (!PyArg_GetLong(args, 4, 2, &arg5)) - return NULL; - if (!PyArg_GetLong(args, 4, 3, &arg6)) - return NULL; - if (arg6 == N_ST) - ncoords = 2; - else if (arg6 == N_STW) - ncoords = 3; - else { - PyErr_BadArgument(); - return NULL; - } - npoints = arg1 - arg5; - if (!PyArg_GetObject(args, 4, 1, &v)) - return NULL; - if (!PyList_Check(v) || PyList_Size(v) != npoints) { - PyErr_BadArgument(); - return NULL; - } - if ((arg4 = PyMem_NEW(double, npoints*ncoords )) == NULL) { - return PyErr_NoMemory(); - } - pnext = arg4; - for (i = 0; i < npoints; i++) { - if (!PyArg_GetDoubleArray(PyList_GetItem(v, i), 1, 0, ncoords, pnext)) - return NULL; - pnext += ncoords; - } - arg3 = (sizeof(double)) * ncoords; - nurbscurve( arg1 , arg2 , arg3 , arg4 , arg5 , arg6 ); - PyMem_DEL(arg2); - PyMem_DEL(arg4); - Py_INCREF(Py_None); - return Py_None; -} - -/* pwlcurve(points, type). - Points is a list of points. Type must be N_ST. */ - -%pwlcurve - -static PyObject * -gl_pwlcurve(self, args) - PyObject *self; - PyObject *args; -{ - PyObject *v; - long type; - double *data, *pnext; - long npoints, ncoords; - int i; - if (!PyArg_GetObject(args, 2, 0, &v)) - return NULL; - if (!PyArg_GetLong(args, 2, 1, &type)) - return NULL; - if (!PyList_Check(v)) { - PyErr_BadArgument(); - return NULL; - } - npoints = PyList_Size(v); - if (type == N_ST) - ncoords = 2; - else { - PyErr_BadArgument(); - return NULL; - } - if ((data = PyMem_NEW(double, npoints*ncoords)) == NULL) { - return PyErr_NoMemory(); - } - pnext = data; - for (i = 0; i < npoints; i++) { - if (!PyArg_GetDoubleArray(PyList_GetItem(v, i), 1, 0, ncoords, pnext)) - return NULL; - pnext += ncoords; - } - pwlcurve(npoints, data, sizeof(double)*ncoords, type); - PyMem_DEL(data); - Py_INCREF(Py_None); - return Py_None; -} - - -/* Picking and Selecting */ - -static short *pickbuffer = NULL; -static long pickbuffersize; - -static PyObject * -pick_select(args, func) - PyObject *args; - void (*func)(); -{ - if (!PyArg_GetLong(args, 1, 0, &pickbuffersize)) - return NULL; - if (pickbuffer != NULL) { - PyErr_SetString(PyExc_RuntimeError, - "pick/gselect: already picking/selecting"); - return NULL; - } - if ((pickbuffer = PyMem_NEW(short, pickbuffersize)) == NULL) { - return PyErr_NoMemory(); - } - (*func)(pickbuffer, pickbuffersize); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -endpick_select(args, func) - PyObject *args; - long (*func)(); -{ - PyObject *v, *w; - int i, nhits, n; - if (pickbuffer == NULL) { - PyErr_SetString(PyExc_RuntimeError, - "endpick/endselect: not in pick/select mode"); - return NULL; - } - nhits = (*func)(pickbuffer); - if (nhits < 0) { - nhits = -nhits; /* How to report buffer overflow otherwise? */ - } - /* Scan the buffer to see how many integers */ - n = 0; - for (; nhits > 0; nhits--) { - n += 1 + pickbuffer[n]; - } - v = PyList_New(n); - if (v == NULL) - return NULL; - /* XXX Could do it nicer and interpret the data structure here, - returning a list of lists. But this can be done in Python... */ - for (i = 0; i < n; i++) { - w = PyInt_FromLong((long)pickbuffer[i]); - if (w == NULL) { - Py_DECREF(v); - return NULL; - } - PyList_SetItem(v, i, w); - } - PyMem_DEL(pickbuffer); - pickbuffer = NULL; - return v; -} - -extern void pick(), gselect(); -extern long endpick(), endselect(); - -%pick -static PyObject *gl_pick(self, args) PyObject *self, *args; { - return pick_select(args, pick); -} - -%endpick -static PyObject *gl_endpick(self, args) PyObject *self, *args; { - return endpick_select(args, endpick); -} - -%gselect -static PyObject *gl_gselect(self, args) PyObject *self, *args; { - return pick_select(args, gselect); -} - -%endselect -static PyObject *gl_endselect(self, args) PyObject *self, *args; { - return endpick_select(args, endselect); -} - - -/* XXX The generator botches this one. Here's a quick hack to fix it. */ - -/* XXX The generator botches this one. Here's a quick hack to fix it. */ - -% getmatrix float r[16] - -static PyObject * -gl_getmatrix(self, args) - PyObject *self; - PyObject *args; -{ - Matrix arg1; - PyObject *v, *w; - int i, j; - getmatrix( arg1 ); - v = PyList_New(16); - if (v == NULL) { - return PyErr_NoMemory(); - } - for (i = 0; i < 4; i++) for (j = 0; j < 4; j++) { - w = mknewfloatobject(arg1[i][j]); - if (w == NULL) { - Py_DECREF(v); - return NULL; - } - PyList_SetItem(v, i*4+j, w); - } - return v; -} - -/* Here's an alternate version that returns a 4x4 matrix instead of - a vector. Unfortunately it is incompatible with loadmatrix and - multmatrix... */ - -% altgetmatrix float r[4][4] - -static PyObject * -gl_altgetmatrix(self, args) - PyObject *self; - PyObject *args; -{ - Matrix arg1; - PyObject *v, *w; - int i, j; - getmatrix( arg1 ); - v = PyList_New(4); - if (v == NULL) { - return NULL; - } - for (i = 0; i < 4; i++) { - w = PyList_New(4); - if (w == NULL) { - Py_DECREF(v); - return NULL; - } - PyList_SetItem(v, i, w); - } - for (i = 0; i < 4; i++) { - for (j = 0; j < 4; j++) { - w = mknewfloatobject(arg1[i][j]); - if (w == NULL) { - Py_DECREF(v); - return NULL; - } - PyList_SetItem(PyList_GetItem(v, i), j, w); - } - } - return v; -} - -% lrectwrite - -static PyObject * -gl_lrectwrite(self, args) - PyObject *self; - PyObject *args; -{ - short x1 ; - short y1 ; - short x2 ; - short y2 ; - string parray ; - PyObject *s; -#if 0 - int pixcount; -#endif - if (!PyArg_GetShort(args, 5, 0, &x1)) - return NULL; - if (!PyArg_GetShort(args, 5, 1, &y1)) - return NULL; - if (!PyArg_GetShort(args, 5, 2, &x2)) - return NULL; - if (!PyArg_GetShort(args, 5, 3, &y2)) - return NULL; - if (!PyArg_GetString(args, 5, 4, &parray)) - return NULL; - if (!PyArg_GetObject(args, 5, 4, &s)) - return NULL; -#if 0 -/* Don't check this, it breaks experiments with pixmode(PM_SIZE, ...) */ - pixcount = (long)(x2+1-x1) * (long)(y2+1-y1); - if (!PyString_Check(s) || PyString_Size(s) != pixcount*sizeof(long)) { - PyErr_SetString(PyExc_RuntimeError, - "string arg to lrectwrite has wrong size"); - return NULL; - } -#endif - lrectwrite( x1 , y1 , x2 , y2 , (unsigned long *) parray ); - Py_INCREF(Py_None); - return Py_None; -} - -% lrectread - -static PyObject * -gl_lrectread(self, args) - PyObject *self; - PyObject *args; -{ - short x1 ; - short y1 ; - short x2 ; - short y2 ; - PyObject *parray; - int pixcount; - if (!PyArg_GetShort(args, 4, 0, &x1)) - return NULL; - if (!PyArg_GetShort(args, 4, 1, &y1)) - return NULL; - if (!PyArg_GetShort(args, 4, 2, &x2)) - return NULL; - if (!PyArg_GetShort(args, 4, 3, &y2)) - return NULL; - pixcount = (long)(x2+1-x1) * (long)(y2+1-y1); - parray = PyString_FromStringAndSize((char *)NULL, pixcount*sizeof(long)); - if (parray == NULL) - return NULL; /* No memory */ - lrectread(x1, y1, x2, y2, (unsigned long *) PyString_AsString(parray)); - return parray; -} - -% readdisplay - -static PyObject * -gl_readdisplay(self, args) - PyObject *self; - PyObject *args; -{ - short x1, y1, x2, y2; - unsigned long *parray, hints; - long size, size_ret; - PyObject *rv; - - if ( !PyArg_Parse(args, "hhhhl", &x1, &y1, &x2, &y2, &hints) ) - return 0; - size = (long)(x2+1-x1) * (long)(y2+1-y1); - rv = PyString_FromStringAndSize((char *)NULL, size*sizeof(long)); - if ( rv == NULL ) - return NULL; - parray = (unsigned long *)PyString_AsString(rv); - size_ret = readdisplay(x1, y1, x2, y2, parray, hints); - if ( size_ret != size ) { - printf("gl_readdisplay: got %ld pixels, expected %ld\n", - size_ret, size); - PyErr_SetString(PyExc_RuntimeError, "readdisplay returned unexpected length"); - return NULL; - } - return rv; -} - -/* Desperately needed, here are tools to compress and decompress - the data manipulated by lrectread/lrectwrite. - - gl.packrect(width, height, packfactor, bigdata) --> smalldata - makes 'bigdata' 4*(packfactor**2) times smaller by: - - turning it into B/W (a factor 4) - - replacing squares of size pacfactor by one - representative - - gl.unpackrect(width, height, packfactor, smalldata) --> bigdata - is the inverse; the numeric arguments must be *the same*. - - Both work best if width and height are multiples of packfactor - (in fact unpackrect will leave garbage bytes). -*/ - -% packrect - -static PyObject * -gl_packrect(self, args) - PyObject *self; - PyObject *args; -{ - long width, height, packfactor; - char *s; - PyObject *unpacked, *packed; - int pixcount, packedcount, x, y, r, g, b; - unsigned long pixel; - unsigned char *p; - unsigned long *parray; - if (!PyArg_GetLong(args, 4, 0, &width)) - return NULL; - if (!PyArg_GetLong(args, 4, 1, &height)) - return NULL; - if (!PyArg_GetLong(args, 4, 2, &packfactor)) - return NULL; - if (!PyArg_GetString(args, 4, 3, &s)) /* For type checking only */ - return NULL; - if (!PyArg_GetObject(args, 4, 3, &unpacked)) - return NULL; - if (width <= 0 || height <= 0 || packfactor <= 0) { - PyErr_SetString(PyExc_RuntimeError, "packrect args must be > 0"); - return NULL; - } - pixcount = width*height; - packedcount = ((width+packfactor-1)/packfactor) * - ((height+packfactor-1)/packfactor); - if (PyString_Size(unpacked) != pixcount*sizeof(long)) { - PyErr_SetString(PyExc_RuntimeError, - "string arg to packrect has wrong size"); - return NULL; - } - packed = PyString_FromStringAndSize((char *)NULL, packedcount); - if (packed == NULL) - return NULL; - parray = (unsigned long *) PyString_AsString(unpacked); - p = (unsigned char *) PyString_AsString(packed); - for (y = 0; y < height; y += packfactor, parray += packfactor*width) { - for (x = 0; x < width; x += packfactor) { - pixel = parray[x]; - r = pixel & 0xff; - g = (pixel >> 8) & 0xff; - b = (pixel >> 16) & 0xff; - *p++ = (30*r+59*g+11*b) / 100; - } - } - return packed; -} - -% unpackrect - -static unsigned long unpacktab[256]; -static int unpacktab_inited = 0; - -static PyObject * -gl_unpackrect(self, args) - PyObject *self; - PyObject *args; -{ - long width, height, packfactor; - char *s; - PyObject *unpacked, *packed; - int pixcount, packedcount; - register unsigned char *p; - register unsigned long *parray; - if (!unpacktab_inited) { - register int white; - for (white = 256; --white >= 0; ) - unpacktab[white] = white * 0x010101L; - unpacktab_inited++; - } - if (!PyArg_GetLong(args, 4, 0, &width)) - return NULL; - if (!PyArg_GetLong(args, 4, 1, &height)) - return NULL; - if (!PyArg_GetLong(args, 4, 2, &packfactor)) - return NULL; - if (!PyArg_GetString(args, 4, 3, &s)) /* For type checking only */ - return NULL; - if (!PyArg_GetObject(args, 4, 3, &packed)) - return NULL; - if (width <= 0 || height <= 0 || packfactor <= 0) { - PyErr_SetString(PyExc_RuntimeError, "packrect args must be > 0"); - return NULL; - } - pixcount = width*height; - packedcount = ((width+packfactor-1)/packfactor) * - ((height+packfactor-1)/packfactor); - if (PyString_Size(packed) != packedcount) { - PyErr_SetString(PyExc_RuntimeError, - "string arg to unpackrect has wrong size"); - return NULL; - } - unpacked = PyString_FromStringAndSize((char *)NULL, pixcount*sizeof(long)); - if (unpacked == NULL) - return NULL; - parray = (unsigned long *) PyString_AsString(unpacked); - p = (unsigned char *) PyString_AsString(packed); - if (packfactor == 1 && width*height > 0) { - /* Just expand bytes to longs */ - register int x = width * height; - do { - *parray++ = unpacktab[*p++]; - } while (--x >= 0); - } - else { - register int y; - for (y = 0; y < height-packfactor+1; - y += packfactor, parray += packfactor*width) { - register int x; - for (x = 0; x < width-packfactor+1; x += packfactor) { - register unsigned long pixel = unpacktab[*p++]; - register int i; - for (i = packfactor*width; (i-=width) >= 0;) { - register int j; - for (j = packfactor; --j >= 0; ) - parray[i+x+j] = pixel; - } - } - } - } - return unpacked; -} - -% gversion -static PyObject * -gl_gversion(self, args) - PyObject *self; - PyObject *args; -{ - char buf[20]; - gversion(buf); - return PyString_FromString(buf); -} - - -/* void clear - Manual because of clash with termcap */ -%clear -static PyObject * -gl_clear(self, args) - PyObject *self; - PyObject *args; -{ - __GLclear( ); - Py_INCREF(Py_None); - return Py_None; -} - -/* End of manually written stubs */ - -%% - -long getshade -if !solaris void devport short s long s -void rdr2i long s long s -void rectfs short s short s short s short s -void rects short s short s short s short s -void rmv2i long s long s -void noport -void popviewport -void clearhitcode -void closeobj -void cursoff -void curson -void doublebuffer -void finish -void gconfig -void ginit -void greset -void multimap -void onemap -void popattributes -void popmatrix -void pushattributes -void pushmatrix -void pushviewport -void qreset -void RGBmode -void singlebuffer -void swapbuffers -void gsync -void gflush -void tpon -void tpoff -void clkon -void clkoff -void ringbell -#void callfunc -void gbegin -void textinit -void initnames -void pclos -void popname -if !solaris void spclos -void zclear -void screenspace -void reshapeviewport -void winpush -void winpop -void foreground -void endfullscrn -if !solaris void endpupmode -void fullscrn -if !solaris void pupmode -void winconstraints -void pagecolor short s -void textcolor short s -void color short s -void curveit short s -void font short s -void linewidth short s -void setlinestyle short s -void setmap short s -void swapinterval short s -void writemask short s -if !solaris void textwritemask short s -void qdevice short s -void unqdevice short s -void curvebasis short s -void curveprecision short s -void loadname short s -void passthrough short s -void pushname short s -void setmonitor short s -if !solaris void setshade short s -void setpattern short s -if !solaris void pagewritemask short s -# -void callobj long s -void delobj long s -void editobj long s -void makeobj long s -void maketag long s -void chunksize long s -void compactify long s -void deltag long s -void lsrepeat long s -void objinsert long s -void objreplace long s -void winclose long s -void blanktime long s -void freepup long s -# This is not in the library!? -###void pupcolor long s -# -void backbuffer long s -void frontbuffer long s -if !solaris void lsbackup long s -void resetls long s -void lampon long s -void lampoff long s -void setbell long s -void blankscreen long s -void depthcue long s -void zbuffer long s -void backface long s -# -void cmov2i long s long s -void draw2i long s long s -void move2i long s long s -void pnt2i long s long s -void patchbasis long s long s -void patchprecision long s long s -void pdr2i long s long s -void pmv2i long s long s -void rpdr2i long s long s -void rpmv2i long s long s -void xfpt2i long s long s -void objdelete long s long s -void patchcurves long s long s -void minsize long s long s -void maxsize long s long s -void keepaspect long s long s -void prefsize long s long s -void stepunit long s long s -void fudge long s long s -void winmove long s long s -# -void attachcursor short s short s -void deflinestyle short s short s -void noise short s short s -void picksize short s short s -void qenter short s short s -void setdepth short s short s -void cmov2s short s short s -void draw2s short s short s -void move2s short s short s -void pdr2s short s short s -void pmv2s short s short s -void pnt2s short s short s -void rdr2s short s short s -void rmv2s short s short s -void rpdr2s short s short s -void rpmv2s short s short s -void xfpt2s short s short s -# -void cmov2 float s float s -void draw2 float s float s -void move2 float s float s -void pnt2 float s float s -void pdr2 float s float s -void pmv2 float s float s -void rdr2 float s float s -void rmv2 float s float s -void rpdr2 float s float s -void rpmv2 float s float s -void xfpt2 float s float s -# -void loadmatrix float s[4*4] -# Really [4][4] -void multmatrix float s[4*4] -# Really [4][4] -void crv float s[3*4] -# Really [4][3] -void rcrv float s[4*4] -# Really [4][4] -# -# Methods that have strings. -# -void addtopup long s char *s long s -void charstr char *s -void getport char *s -long strwidth char *s -long winopen char *s -void wintitle char *s -# -# Methods that have 1 long (# of elements) and an array -# -void polf long s float s[3*arg1] -void polf2 long s float s[2*arg1] -void poly long s float s[3*arg1] -void poly2 long s float s[2*arg1] -void crvn long s float s[3*arg1] -void rcrvn long s float s[4*arg1] -# -void polf2i long s long s[2*arg1] -void polfi long s long s[3*arg1] -void poly2i long s long s[2*arg1] -void polyi long s long s[3*arg1] -# -void polf2s long s short s[2*arg1] -void polfs long s short s[3*arg1] -void polys long s short s[3*arg1] -void poly2s long s short s[2*arg1] -# -void defcursor short s u_short s[128] -# Is this useful? -void writepixels short s u_short s[arg1] -# Should be unsigned short... -void defbasis long s float s[4*4] -if !solaris void gewrite short s short s[arg1] -# -void rotate short s char s -# This is not in the library!? -###void setbutton short s char s -void rot float s char s -# -void circfi long s long s long s -void circi long s long s long s -void cmovi long s long s long s -void drawi long s long s long s -void movei long s long s long s -void pnti long s long s long s -void newtag long s long s long s -void pdri long s long s long s -void pmvi long s long s long s -void rdri long s long s long s -void rmvi long s long s long s -void rpdri long s long s long s -void rpmvi long s long s long s -void xfpti long s long s long s -# -void circ float s float s float s -void circf float s float s float s -void cmov float s float s float s -void draw float s float s float s -void move float s float s float s -void pnt float s float s float s -void scale float s float s float s -void translate float s float s float s -void pdr float s float s float s -void pmv float s float s float s -void rdr float s float s float s -void rmv float s float s float s -void rpdr float s float s float s -void rpmv float s float s float s -void xfpt float s float s float s -# -void RGBcolor short s short s short s -void RGBwritemask short s short s short s -void setcursor short s short s short s -void tie short s short s short s -void circfs short s short s short s -void circs short s short s short s -void cmovs short s short s short s -void draws short s short s short s -void moves short s short s short s -void pdrs short s short s short s -void pmvs short s short s short s -void pnts short s short s short s -void rdrs short s short s short s -void rmvs short s short s short s -void rpdrs short s short s short s -void rpmvs short s short s short s -void xfpts short s short s short s -void curorigin short s short s short s -void cyclemap short s short s short s -# -void patch float s[4*4] float s[4*4] float s[4*4] -void splf long s float s[3*arg1] u_short s[arg1] -void splf2 long s float s[2*arg1] u_short s[arg1] -void splfi long s long s[3*arg1] u_short s[arg1] -void splf2i long s long s[2*arg1] u_short s[arg1] -void splfs long s short s[3*arg1] u_short s[arg1] -void splf2s long s short s[2*arg1] u_short s[arg1] -###void defpattern short s short s u_short s[arg2*arg2/16] -# -void rpatch float s[4*4] float s[4*4] float s[4*4] float s[4*4] -# -# routines that send 4 floats -# -void ortho2 float s float s float s float s -void rect float s float s float s float s -void rectf float s float s float s float s -void xfpt4 float s float s float s float s -# -void textport short s short s short s short s -void mapcolor short s short s short s short s -void scrmask short s short s short s short s -void setvaluator short s short s short s short s -void viewport short s short s short s short s -void shaderange short s short s short s short s -void xfpt4s short s short s short s short s -void rectfi long s long s long s long s -void recti long s long s long s long s -void xfpt4i long s long s long s long s -void prefposition long s long s long s long s -# -void arc float s float s float s short s short s -void arcf float s float s float s short s short s -void arcfi long s long s long s short s short s -void arci long s long s long s short s short s -# -void bbox2 short s short s float s float s float s float s -void bbox2i short s short s long s long s long s long s -void bbox2s short s short s short s short s short s short s -void blink short s short s short s short s short s -void ortho float s float s float s float s float s float s -void window float s float s float s float s float s float s -void lookat float s float s float s float s float s float s short s -# -void perspective short s float s float s float s -void polarview float s short s short s short s -# XXX getichararray not supported -#void writeRGB short s char s[arg1] char s[arg1] char s[arg1] -# -void arcfs short s short s short s short s short s -void arcs short s short s short s short s short s -void rectcopy short s short s short s short s short s short s -if !solaris void RGBcursor short s short s short s short s short s short s short s -# -long getbutton short s -long getcmmode -long getlsbackup -long getresetls -long getdcm -long getzbuffer -long ismex -long isobj long s -long isqueued short s -long istag long s -# -long genobj -long gentag -long getbuffer -long getcolor -long getdisplaymode -long getfont -long getheight -long gethitcode -long getlstyle -long getlwidth -long getmap -long getplanes -long getwritemask -long qtest -long getlsrepeat -long getmonitor -long getopenobj -long getpattern -long winget -long winattach -long getothermonitor -long newpup -# -long getvaluator short s -void winset long s -long dopup long s -void getdepth short r short r -void getcpos short r short r -void getsize long r long r -void getorigin long r long r -void getviewport short r short r short r short r -if !solaris void gettp short r short r short r short r -void getgpos float r float r float r float r -void winposition long s long s long s long s -void gRGBcolor short r short r short r -void gRGBmask short r short r short r -void getscrmask short r short r short r short r -###void gRGBcursor short r short r short r short r short r short r short r short r -void getmcolor short s short r short r short r -void mapw long s short s short s float r float r float r float r float r float r -void mapw2 long s short s short s float r float r -###void defrasterfont short s short s short s Fontchar s[arg3] short s short s[4*arg5] -###long qread short r -void getcursor short r u_short r u_short r long r -# -# For these we receive arrays of stuff -# -###void getdev long s short s[arg1] short r[arg1] -#XXX not generated correctly yet -#void getmatrix float r[16] -###long readpixels short s short r[retval] -###long readRGB short s char r[retval] char r[retval] char r[retval] -###long blkqread short s short r[arg1] -# -# New 4D routines -# -void cmode -void concave long s -void curstype long s -void drawmode long s -void gammaramp short s[256] short s[256] short s[256] -long getbackface -long getdescender -long getdrawmode -long getmmode -long getsm -long getvideo long s -void imakebackground -void lmbind short s short s -void lmdef long s long s long s float s[arg3] -void mmode long s -void normal float s[3] -void overlay long s -void RGBrange short s short s short s short s short s short s short s short s -if !solaris void setvideo long s long s -void shademodel long s -void underlay long s -# -# New Personal Iris/GT Routines -# -void bgnclosedline -void bgnline -void bgnpoint -void bgnpolygon -void bgnsurface -void bgntmesh -void bgntrim -void endclosedline -void endline -void endpoint -void endpolygon -void endsurface -void endtmesh -void endtrim -void blendfunction long s long s -void c3f float s[3] -void c3i long s[3] -void c3s short s[3] -void c4f float s[4] -void c4i long s[4] -void c4s short s[4] -void colorf float s -void cpack long s -void czclear long s long s -void dglclose long s -long dglopen char *s long s -long getgdesc long s -void getnurbsproperty long s float r -void glcompat long s long s -void iconsize long s long s -void icontitle char *s -void lRGBrange short s short s short s short s short s short s long s long s -void linesmooth long s -void lmcolor long s -void logicop long s -###long lrectread short s short s short s short s long r[retval] -###void lrectwrite short s short s short s short s long s[(arg2-arg1+1)*(arg4-arg3+1)] -### Now manual, with string last arg -###long rectread short s short s short s short s short r[retval] -###void rectwrite short s short s short s short s short s[(arg2-arg1+1)*(arg4-arg3+1)] -void lsetdepth long s long s -void lshaderange short s short s long s long s -void n3f float s[3] -void noborder -void pntsmooth long s -void readsource long s -void rectzoom float s float s -void sbox float s float s float s float s -void sboxi long s long s long s long s -void sboxs short s short s short s short s -void sboxf float s float s float s float s -void sboxfi long s long s long s long s -void sboxfs short s short s short s short s -void setnurbsproperty long s float s -void setpup long s long s long s -void smoothline long s -void subpixel long s -void swaptmesh -long swinopen long s -void v2f float s[2] -void v2i long s[2] -void v2s short s[2] -void v3f float s[3] -void v3i long s[3] -void v3s short s[3] -void v4f float s[4] -void v4i long s[4] -void v4s short s[4] -void videocmd long s -long windepth long s -void wmpack long s -void zdraw long s -void zfunction long s -void zsource long s -void zwritemask long s -# -# uses doubles -# -void v2d double s[2] -void v3d double s[3] -void v4d double s[4] -# -# Why isn't this here? -# -void pixmode long s long s -# -# New in IRIX 4.0 -# -long qgetfd -void dither long s Deleted: /python/branches/cpy_merge/Modules/md5.c ============================================================================== --- /python/branches/cpy_merge/Modules/md5.c Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,381 +0,0 @@ -/* - Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - L. Peter Deutsch - ghost at aladdin.com - - */ -/* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ -/* - Independent implementation of MD5 (RFC 1321). - - This code implements the MD5 Algorithm defined in RFC 1321, whose - text is available at - http://www.ietf.org/rfc/rfc1321.txt - The code is derived from the text of the RFC, including the test suite - (section A.5) but excluding the rest of Appendix A. It does not include - any code or documentation that is identified in the RFC as being - copyrighted. - - The original and principal author of md5.c is L. Peter Deutsch - . Other authors are noted in the change history - that follows (in reverse chronological order): - - 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order - either statically or dynamically; added missing #include - in library. - 2002-03-11 lpd Corrected argument list for main(), and added int return - type, in test program and T value program. - 2002-02-21 lpd Added missing #include in test program. - 2000-07-03 lpd Patched to eliminate warnings about "constant is - unsigned in ANSI C, signed in traditional"; made test program - self-checking. - 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. - 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). - 1999-05-03 lpd Original version. - */ - -#include "md5.h" -#include - -#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ -#ifdef ARCH_IS_BIG_ENDIAN -# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) -#else -# define BYTE_ORDER 0 -#endif - -#define T_MASK ((md5_word_t)~0) -#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) -#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) -#define T3 0x242070db -#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) -#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) -#define T6 0x4787c62a -#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) -#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) -#define T9 0x698098d8 -#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) -#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) -#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) -#define T13 0x6b901122 -#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) -#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) -#define T16 0x49b40821 -#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) -#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) -#define T19 0x265e5a51 -#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) -#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) -#define T22 0x02441453 -#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) -#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) -#define T25 0x21e1cde6 -#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) -#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) -#define T28 0x455a14ed -#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) -#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) -#define T31 0x676f02d9 -#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) -#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) -#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) -#define T35 0x6d9d6122 -#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) -#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) -#define T38 0x4bdecfa9 -#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) -#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) -#define T41 0x289b7ec6 -#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) -#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) -#define T44 0x04881d05 -#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) -#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) -#define T47 0x1fa27cf8 -#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) -#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) -#define T50 0x432aff97 -#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) -#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) -#define T53 0x655b59c3 -#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) -#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) -#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) -#define T57 0x6fa87e4f -#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) -#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) -#define T60 0x4e0811a1 -#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) -#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) -#define T63 0x2ad7d2bb -#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) - - -static void -md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) -{ - md5_word_t - a = pms->abcd[0], b = pms->abcd[1], - c = pms->abcd[2], d = pms->abcd[3]; - md5_word_t t; -#if BYTE_ORDER > 0 - /* Define storage only for big-endian CPUs. */ - md5_word_t X[16]; -#else - /* Define storage for little-endian or both types of CPUs. */ - md5_word_t xbuf[16]; - const md5_word_t *X; -#endif - - { -#if BYTE_ORDER == 0 - /* - * Determine dynamically whether this is a big-endian or - * little-endian machine, since we can use a more efficient - * algorithm on the latter. - */ - static const int w = 1; - - if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ -#endif -#if BYTE_ORDER <= 0 /* little-endian */ - { - /* - * On little-endian machines, we can process properly aligned - * data without copying it. - */ - if (!((data - (const md5_byte_t *)0) & 3)) { - /* data are properly aligned */ - X = (const md5_word_t *)data; - } else { - /* not aligned */ - memcpy(xbuf, data, 64); - X = xbuf; - } - } -#endif -#if BYTE_ORDER == 0 - else /* dynamic big-endian */ -#endif -#if BYTE_ORDER >= 0 /* big-endian */ - { - /* - * On big-endian machines, we must arrange the bytes in the - * right order. - */ - const md5_byte_t *xp = data; - int i; - -# if BYTE_ORDER == 0 - X = xbuf; /* (dynamic only) */ -# else -# define xbuf X /* (static only) */ -# endif - for (i = 0; i < 16; ++i, xp += 4) - xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); - } -#endif - } - -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) - - /* Round 1. */ - /* Let [abcd k s i] denote the operation - a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ -#define F(x, y, z) (((x) & (y)) | (~(x) & (z))) -#define SET(a, b, c, d, k, s, Ti)\ - t = a + F(b,c,d) + X[k] + Ti;\ - a = ROTATE_LEFT(t, s) + b - /* Do the following 16 operations. */ - SET(a, b, c, d, 0, 7, T1); - SET(d, a, b, c, 1, 12, T2); - SET(c, d, a, b, 2, 17, T3); - SET(b, c, d, a, 3, 22, T4); - SET(a, b, c, d, 4, 7, T5); - SET(d, a, b, c, 5, 12, T6); - SET(c, d, a, b, 6, 17, T7); - SET(b, c, d, a, 7, 22, T8); - SET(a, b, c, d, 8, 7, T9); - SET(d, a, b, c, 9, 12, T10); - SET(c, d, a, b, 10, 17, T11); - SET(b, c, d, a, 11, 22, T12); - SET(a, b, c, d, 12, 7, T13); - SET(d, a, b, c, 13, 12, T14); - SET(c, d, a, b, 14, 17, T15); - SET(b, c, d, a, 15, 22, T16); -#undef SET - - /* Round 2. */ - /* Let [abcd k s i] denote the operation - a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ -#define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) -#define SET(a, b, c, d, k, s, Ti)\ - t = a + G(b,c,d) + X[k] + Ti;\ - a = ROTATE_LEFT(t, s) + b - /* Do the following 16 operations. */ - SET(a, b, c, d, 1, 5, T17); - SET(d, a, b, c, 6, 9, T18); - SET(c, d, a, b, 11, 14, T19); - SET(b, c, d, a, 0, 20, T20); - SET(a, b, c, d, 5, 5, T21); - SET(d, a, b, c, 10, 9, T22); - SET(c, d, a, b, 15, 14, T23); - SET(b, c, d, a, 4, 20, T24); - SET(a, b, c, d, 9, 5, T25); - SET(d, a, b, c, 14, 9, T26); - SET(c, d, a, b, 3, 14, T27); - SET(b, c, d, a, 8, 20, T28); - SET(a, b, c, d, 13, 5, T29); - SET(d, a, b, c, 2, 9, T30); - SET(c, d, a, b, 7, 14, T31); - SET(b, c, d, a, 12, 20, T32); -#undef SET - - /* Round 3. */ - /* Let [abcd k s t] denote the operation - a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define SET(a, b, c, d, k, s, Ti)\ - t = a + H(b,c,d) + X[k] + Ti;\ - a = ROTATE_LEFT(t, s) + b - /* Do the following 16 operations. */ - SET(a, b, c, d, 5, 4, T33); - SET(d, a, b, c, 8, 11, T34); - SET(c, d, a, b, 11, 16, T35); - SET(b, c, d, a, 14, 23, T36); - SET(a, b, c, d, 1, 4, T37); - SET(d, a, b, c, 4, 11, T38); - SET(c, d, a, b, 7, 16, T39); - SET(b, c, d, a, 10, 23, T40); - SET(a, b, c, d, 13, 4, T41); - SET(d, a, b, c, 0, 11, T42); - SET(c, d, a, b, 3, 16, T43); - SET(b, c, d, a, 6, 23, T44); - SET(a, b, c, d, 9, 4, T45); - SET(d, a, b, c, 12, 11, T46); - SET(c, d, a, b, 15, 16, T47); - SET(b, c, d, a, 2, 23, T48); -#undef SET - - /* Round 4. */ - /* Let [abcd k s t] denote the operation - a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ -#define I(x, y, z) ((y) ^ ((x) | ~(z))) -#define SET(a, b, c, d, k, s, Ti)\ - t = a + I(b,c,d) + X[k] + Ti;\ - a = ROTATE_LEFT(t, s) + b - /* Do the following 16 operations. */ - SET(a, b, c, d, 0, 6, T49); - SET(d, a, b, c, 7, 10, T50); - SET(c, d, a, b, 14, 15, T51); - SET(b, c, d, a, 5, 21, T52); - SET(a, b, c, d, 12, 6, T53); - SET(d, a, b, c, 3, 10, T54); - SET(c, d, a, b, 10, 15, T55); - SET(b, c, d, a, 1, 21, T56); - SET(a, b, c, d, 8, 6, T57); - SET(d, a, b, c, 15, 10, T58); - SET(c, d, a, b, 6, 15, T59); - SET(b, c, d, a, 13, 21, T60); - SET(a, b, c, d, 4, 6, T61); - SET(d, a, b, c, 11, 10, T62); - SET(c, d, a, b, 2, 15, T63); - SET(b, c, d, a, 9, 21, T64); -#undef SET - - /* Then perform the following additions. (That is increment each - of the four registers by the value it had before this block - was started.) */ - pms->abcd[0] += a; - pms->abcd[1] += b; - pms->abcd[2] += c; - pms->abcd[3] += d; -} - -void -md5_init(md5_state_t *pms) -{ - pms->count[0] = pms->count[1] = 0; - pms->abcd[0] = 0x67452301; - pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; - pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; - pms->abcd[3] = 0x10325476; -} - -void -md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) -{ - const md5_byte_t *p = data; - int left = nbytes; - int offset = (pms->count[0] >> 3) & 63; - md5_word_t nbits = (md5_word_t)(nbytes << 3); - - if (nbytes <= 0) - return; - - /* Update the message length. */ - pms->count[1] += nbytes >> 29; - pms->count[0] += nbits; - if (pms->count[0] < nbits) - pms->count[1]++; - - /* Process an initial partial block. */ - if (offset) { - int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); - - memcpy(pms->buf + offset, p, copy); - if (offset + copy < 64) - return; - p += copy; - left -= copy; - md5_process(pms, pms->buf); - } - - /* Process full blocks. */ - for (; left >= 64; p += 64, left -= 64) - md5_process(pms, p); - - /* Process a final partial block. */ - if (left) - memcpy(pms->buf, p, left); -} - -void -md5_finish(md5_state_t *pms, md5_byte_t digest[16]) -{ - static const md5_byte_t pad[64] = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - md5_byte_t data[8]; - int i; - - /* Save the length before padding. */ - for (i = 0; i < 8; ++i) - data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); - /* Pad to 56 bytes mod 64. */ - md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); - /* Append the length. */ - md5_append(pms, data, 8); - for (i = 0; i < 16; ++i) - digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); -} Deleted: /python/branches/cpy_merge/Modules/md5.h ============================================================================== --- /python/branches/cpy_merge/Modules/md5.h Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,91 +0,0 @@ -/* - Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - L. Peter Deutsch - ghost at aladdin.com - - */ -/* $Id$ */ -/* - Independent implementation of MD5 (RFC 1321). - - This code implements the MD5 Algorithm defined in RFC 1321, whose - text is available at - http://www.ietf.org/rfc/rfc1321.txt - The code is derived from the text of the RFC, including the test suite - (section A.5) but excluding the rest of Appendix A. It does not include - any code or documentation that is identified in the RFC as being - copyrighted. - - The original and principal author of md5.h is L. Peter Deutsch - . Other authors are noted in the change history - that follows (in reverse chronological order): - - 2002-04-13 lpd Removed support for non-ANSI compilers; removed - references to Ghostscript; clarified derivation from RFC 1321; - now handles byte order either statically or dynamically. - 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. - 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); - added conditionalization for C++ compilation from Martin - Purschke . - 1999-05-03 lpd Original version. - */ - -#ifndef md5_INCLUDED -# define md5_INCLUDED - -/* - * This package supports both compile-time and run-time determination of CPU - * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be - * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is - * defined as non-zero, the code will be compiled to run only on big-endian - * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to - * run on either big- or little-endian CPUs, but will run slightly less - * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. - */ - -typedef unsigned char md5_byte_t; /* 8-bit byte */ -typedef unsigned int md5_word_t; /* 32-bit word */ - -/* Define the state of the MD5 Algorithm. */ -typedef struct md5_state_s { - md5_word_t count[2]; /* message length in bits, lsw first */ - md5_word_t abcd[4]; /* digest buffer */ - md5_byte_t buf[64]; /* accumulate block */ -} md5_state_t; - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* Initialize the algorithm. */ -void md5_init(md5_state_t *pms); - -/* Append a string to the message. */ -void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); - -/* Finish the message and return the digest. */ -void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); - -#ifdef __cplusplus -} /* end extern "C" */ -#endif - -#endif /* md5_INCLUDED */ Deleted: /python/branches/cpy_merge/Modules/md5module.c ============================================================================== --- /python/branches/cpy_merge/Modules/md5module.c Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,312 +0,0 @@ - -/* MD5 module */ - -/* This module provides an interface to the RSA Data Security, - Inc. MD5 Message-Digest Algorithm, described in RFC 1321. - It requires the files md5c.c and md5.h (which are slightly changed - from the versions in the RFC to avoid the "global.h" file.) */ - - -/* MD5 objects */ - -#include "Python.h" -#include "structmember.h" -#include "md5.h" - -typedef struct { - PyObject_HEAD - md5_state_t md5; /* the context holder */ -} md5object; - -static PyTypeObject MD5type; - -#define is_md5object(v) ((v)->ob_type == &MD5type) - -static md5object * -newmd5object(void) -{ - md5object *md5p; - - md5p = PyObject_New(md5object, &MD5type); - if (md5p == NULL) - return NULL; - - md5_init(&md5p->md5); /* actual initialisation */ - return md5p; -} - - -/* MD5 methods */ - -static void -md5_dealloc(md5object *md5p) -{ - PyObject_Del(md5p); -} - - -/* MD5 methods-as-attributes */ - -static PyObject * -md5_update(md5object *self, PyObject *args) -{ - unsigned char *cp; - int len; - - if (!PyArg_ParseTuple(args, "s#:update", &cp, &len)) - return NULL; - - md5_append(&self->md5, cp, len); - - Py_INCREF(Py_None); - return Py_None; -} - -PyDoc_STRVAR(update_doc, -"update (arg)\n\ -\n\ -Update the md5 object with the string arg. Repeated calls are\n\ -equivalent to a single call with the concatenation of all the\n\ -arguments."); - - -static PyObject * -md5_digest(md5object *self) -{ - md5_state_t mdContext; - unsigned char aDigest[16]; - - /* make a temporary copy, and perform the final */ - mdContext = self->md5; - md5_finish(&mdContext, aDigest); - - return PyString_FromStringAndSize((char *)aDigest, 16); -} - -PyDoc_STRVAR(digest_doc, -"digest() -> string\n\ -\n\ -Return the digest of the strings passed to the update() method so\n\ -far. This is a 16-byte string which may contain non-ASCII characters,\n\ -including null bytes."); - - -static PyObject * -md5_hexdigest(md5object *self) -{ - md5_state_t mdContext; - unsigned char digest[16]; - unsigned char hexdigest[32]; - int i, j; - - /* make a temporary copy, and perform the final */ - mdContext = self->md5; - md5_finish(&mdContext, digest); - - /* Make hex version of the digest */ - for(i=j=0; i<16; i++) { - char c; - c = (digest[i] >> 4) & 0xf; - c = (c>9) ? c+'a'-10 : c + '0'; - hexdigest[j++] = c; - c = (digest[i] & 0xf); - c = (c>9) ? c+'a'-10 : c + '0'; - hexdigest[j++] = c; - } - return PyString_FromStringAndSize((char*)hexdigest, 32); -} - - -PyDoc_STRVAR(hexdigest_doc, -"hexdigest() -> string\n\ -\n\ -Like digest(), but returns the digest as a string of hexadecimal digits."); - - -static PyObject * -md5_copy(md5object *self) -{ - md5object *md5p; - - if ((md5p = newmd5object()) == NULL) - return NULL; - - md5p->md5 = self->md5; - - return (PyObject *)md5p; -} - -PyDoc_STRVAR(copy_doc, -"copy() -> md5 object\n\ -\n\ -Return a copy (``clone'') of the md5 object."); - - -static PyMethodDef md5_methods[] = { - {"update", (PyCFunction)md5_update, METH_VARARGS, update_doc}, - {"digest", (PyCFunction)md5_digest, METH_NOARGS, digest_doc}, - {"hexdigest", (PyCFunction)md5_hexdigest, METH_NOARGS, hexdigest_doc}, - {"copy", (PyCFunction)md5_copy, METH_NOARGS, copy_doc}, - {NULL, NULL} /* sentinel */ -}; - -static PyObject * -md5_get_block_size(PyObject *self, void *closure) -{ - return PyInt_FromLong(64); -} - -static PyObject * -md5_get_digest_size(PyObject *self, void *closure) -{ - return PyInt_FromLong(16); -} - -static PyObject * -md5_get_name(PyObject *self, void *closure) -{ - return PyString_FromStringAndSize("MD5", 3); -} - -static PyGetSetDef md5_getseters[] = { - {"digest_size", - (getter)md5_get_digest_size, NULL, - NULL, - NULL}, - {"block_size", - (getter)md5_get_block_size, NULL, - NULL, - NULL}, - {"name", - (getter)md5_get_name, NULL, - NULL, - NULL}, - /* the old md5 and sha modules support 'digest_size' as in PEP 247. - * the old sha module also supported 'digestsize'. ugh. */ - {"digestsize", - (getter)md5_get_digest_size, NULL, - NULL, - NULL}, - {NULL} /* Sentinel */ -}; - - -PyDoc_STRVAR(module_doc, -"This module implements the interface to RSA's MD5 message digest\n\ -algorithm (see also Internet RFC 1321). Its use is quite\n\ -straightforward: use the new() to create an md5 object. You can now\n\ -feed this object with arbitrary strings using the update() method, and\n\ -at any point you can ask it for the digest (a strong kind of 128-bit\n\ -checksum, a.k.a. ``fingerprint'') of the concatenation of the strings\n\ -fed to it so far using the digest() method.\n\ -\n\ -Functions:\n\ -\n\ -new([arg]) -- return a new md5 object, initialized with arg if provided\n\ -md5([arg]) -- DEPRECATED, same as new, but for compatibility\n\ -\n\ -Special Objects:\n\ -\n\ -MD5Type -- type object for md5 objects"); - -PyDoc_STRVAR(md5type_doc, -"An md5 represents the object used to calculate the MD5 checksum of a\n\ -string of information.\n\ -\n\ -Methods:\n\ -\n\ -update() -- updates the current digest with an additional string\n\ -digest() -- return the current digest value\n\ -hexdigest() -- return the current digest as a string of hexadecimal digits\n\ -copy() -- return a copy of the current md5 object"); - -static PyTypeObject MD5type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ - "_md5.md5", /*tp_name*/ - sizeof(md5object), /*tp_size*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)md5_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT, /*tp_flags*/ - md5type_doc, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - md5_methods, /*tp_methods*/ - 0, /*tp_members*/ - md5_getseters, /*tp_getset*/ -}; - - -/* MD5 functions */ - -static PyObject * -MD5_new(PyObject *self, PyObject *args) -{ - md5object *md5p; - unsigned char *cp = NULL; - int len = 0; - - if (!PyArg_ParseTuple(args, "|s#:new", &cp, &len)) - return NULL; - - if ((md5p = newmd5object()) == NULL) - return NULL; - - if (cp) - md5_append(&md5p->md5, cp, len); - - return (PyObject *)md5p; -} - -PyDoc_STRVAR(new_doc, -"new([arg]) -> md5 object\n\ -\n\ -Return a new md5 object. If arg is present, the method call update(arg)\n\ -is made."); - - -/* List of functions exported by this module */ - -static PyMethodDef md5_functions[] = { - {"new", (PyCFunction)MD5_new, METH_VARARGS, new_doc}, - {NULL, NULL} /* Sentinel */ -}; - - -/* Initialize this module. */ - -PyMODINIT_FUNC -init_md5(void) -{ - PyObject *m, *d; - - MD5type.ob_type = &PyType_Type; - if (PyType_Ready(&MD5type) < 0) - return; - m = Py_InitModule3("_md5", md5_functions, module_doc); - if (m == NULL) - return; - d = PyModule_GetDict(m); - PyDict_SetItemString(d, "MD5Type", (PyObject *)&MD5type); - PyModule_AddIntConstant(m, "digest_size", 16); - /* No need to check the error here, the caller will do that */ -} Deleted: /python/branches/cpy_merge/Modules/shamodule.c ============================================================================== --- /python/branches/cpy_merge/Modules/shamodule.c Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,593 +0,0 @@ -/* SHA module */ - -/* This module provides an interface to NIST's Secure Hash Algorithm */ - -/* See below for information about the original code this module was - based upon. Additional work performed by: - - Andrew Kuchling (amk at amk.ca) - Greg Stein (gstein at lyra.org) - - Copyright (C) 2005 Gregory P. Smith (greg at electricrain.com) - Licensed to PSF under a Contributor Agreement. - -*/ - -/* SHA objects */ - -#include "Python.h" -#include "structmember.h" - - -/* Endianness testing and definitions */ -#define TestEndianness(variable) {int i=1; variable=PCT_BIG_ENDIAN;\ - if (*((char*)&i)==1) variable=PCT_LITTLE_ENDIAN;} - -#define PCT_LITTLE_ENDIAN 1 -#define PCT_BIG_ENDIAN 0 - -/* Some useful types */ - -typedef unsigned char SHA_BYTE; - -#if SIZEOF_INT == 4 -typedef unsigned int SHA_INT32; /* 32-bit integer */ -#else -/* not defined. compilation will die. */ -#endif - -/* The SHA block size and message digest sizes, in bytes */ - -#define SHA_BLOCKSIZE 64 -#define SHA_DIGESTSIZE 20 - -/* The structure for storing SHS info */ - -typedef struct { - PyObject_HEAD - SHA_INT32 digest[5]; /* Message digest */ - SHA_INT32 count_lo, count_hi; /* 64-bit bit count */ - SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */ - int Endianness; - int local; /* unprocessed amount in data */ -} SHAobject; - -/* When run on a little-endian CPU we need to perform byte reversal on an - array of longwords. */ - -static void longReverse(SHA_INT32 *buffer, int byteCount, int Endianness) -{ - SHA_INT32 value; - - if ( Endianness == PCT_BIG_ENDIAN ) - return; - - byteCount /= sizeof(*buffer); - while (byteCount--) { - value = *buffer; - value = ( ( value & 0xFF00FF00L ) >> 8 ) | \ - ( ( value & 0x00FF00FFL ) << 8 ); - *buffer++ = ( value << 16 ) | ( value >> 16 ); - } -} - -static void SHAcopy(SHAobject *src, SHAobject *dest) -{ - dest->Endianness = src->Endianness; - dest->local = src->local; - dest->count_lo = src->count_lo; - dest->count_hi = src->count_hi; - memcpy(dest->digest, src->digest, sizeof(src->digest)); - memcpy(dest->data, src->data, sizeof(src->data)); -} - - -/* ------------------------------------------------------------------------ - * - * This code for the SHA algorithm was noted as public domain. The original - * headers are pasted below. - * - * Several changes have been made to make it more compatible with the - * Python environment and desired interface. - * - */ - -/* NIST Secure Hash Algorithm */ -/* heavily modified by Uwe Hollerbach */ -/* from Peter C. Gutmann's implementation as found in */ -/* Applied Cryptography by Bruce Schneier */ -/* Further modifications to include the "UNRAVEL" stuff, below */ - -/* This code is in the public domain */ - -/* UNRAVEL should be fastest & biggest */ -/* UNROLL_LOOPS should be just as big, but slightly slower */ -/* both undefined should be smallest and slowest */ - -#define UNRAVEL -/* #define UNROLL_LOOPS */ - -/* The SHA f()-functions. The f1 and f3 functions can be optimized to - save one boolean operation each - thanks to Rich Schroeppel, - rcs at cs.arizona.edu for discovering this */ - -/*#define f1(x,y,z) ((x & y) | (~x & z)) // Rounds 0-19 */ -#define f1(x,y,z) (z ^ (x & (y ^ z))) /* Rounds 0-19 */ -#define f2(x,y,z) (x ^ y ^ z) /* Rounds 20-39 */ -/*#define f3(x,y,z) ((x & y) | (x & z) | (y & z)) // Rounds 40-59 */ -#define f3(x,y,z) ((x & y) | (z & (x | y))) /* Rounds 40-59 */ -#define f4(x,y,z) (x ^ y ^ z) /* Rounds 60-79 */ - -/* SHA constants */ - -#define CONST1 0x5a827999L /* Rounds 0-19 */ -#define CONST2 0x6ed9eba1L /* Rounds 20-39 */ -#define CONST3 0x8f1bbcdcL /* Rounds 40-59 */ -#define CONST4 0xca62c1d6L /* Rounds 60-79 */ - -/* 32-bit rotate */ - -#define R32(x,n) ((x << n) | (x >> (32 - n))) - -/* the generic case, for when the overall rotation is not unraveled */ - -#define FG(n) \ - T = R32(A,5) + f##n(B,C,D) + E + *WP++ + CONST##n; \ - E = D; D = C; C = R32(B,30); B = A; A = T - -/* specific cases, for when the overall rotation is unraveled */ - -#define FA(n) \ - T = R32(A,5) + f##n(B,C,D) + E + *WP++ + CONST##n; B = R32(B,30) - -#define FB(n) \ - E = R32(T,5) + f##n(A,B,C) + D + *WP++ + CONST##n; A = R32(A,30) - -#define FC(n) \ - D = R32(E,5) + f##n(T,A,B) + C + *WP++ + CONST##n; T = R32(T,30) - -#define FD(n) \ - C = R32(D,5) + f##n(E,T,A) + B + *WP++ + CONST##n; E = R32(E,30) - -#define FE(n) \ - B = R32(C,5) + f##n(D,E,T) + A + *WP++ + CONST##n; D = R32(D,30) - -#define FT(n) \ - A = R32(B,5) + f##n(C,D,E) + T + *WP++ + CONST##n; C = R32(C,30) - -/* do SHA transformation */ - -static void -sha_transform(SHAobject *sha_info) -{ - int i; - SHA_INT32 T, A, B, C, D, E, W[80], *WP; - - memcpy(W, sha_info->data, sizeof(sha_info->data)); - longReverse(W, (int)sizeof(sha_info->data), sha_info->Endianness); - - for (i = 16; i < 80; ++i) { - W[i] = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16]; - - /* extra rotation fix */ - W[i] = R32(W[i], 1); - } - A = sha_info->digest[0]; - B = sha_info->digest[1]; - C = sha_info->digest[2]; - D = sha_info->digest[3]; - E = sha_info->digest[4]; - WP = W; -#ifdef UNRAVEL - FA(1); FB(1); FC(1); FD(1); FE(1); FT(1); FA(1); FB(1); FC(1); FD(1); - FE(1); FT(1); FA(1); FB(1); FC(1); FD(1); FE(1); FT(1); FA(1); FB(1); - FC(2); FD(2); FE(2); FT(2); FA(2); FB(2); FC(2); FD(2); FE(2); FT(2); - FA(2); FB(2); FC(2); FD(2); FE(2); FT(2); FA(2); FB(2); FC(2); FD(2); - FE(3); FT(3); FA(3); FB(3); FC(3); FD(3); FE(3); FT(3); FA(3); FB(3); - FC(3); FD(3); FE(3); FT(3); FA(3); FB(3); FC(3); FD(3); FE(3); FT(3); - FA(4); FB(4); FC(4); FD(4); FE(4); FT(4); FA(4); FB(4); FC(4); FD(4); - FE(4); FT(4); FA(4); FB(4); FC(4); FD(4); FE(4); FT(4); FA(4); FB(4); - sha_info->digest[0] += E; - sha_info->digest[1] += T; - sha_info->digest[2] += A; - sha_info->digest[3] += B; - sha_info->digest[4] += C; -#else /* !UNRAVEL */ -#ifdef UNROLL_LOOPS - FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); - FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); FG(1); - FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); - FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); FG(2); - FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); - FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); FG(3); - FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); - FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); FG(4); -#else /* !UNROLL_LOOPS */ - for (i = 0; i < 20; ++i) { FG(1); } - for (i = 20; i < 40; ++i) { FG(2); } - for (i = 40; i < 60; ++i) { FG(3); } - for (i = 60; i < 80; ++i) { FG(4); } -#endif /* !UNROLL_LOOPS */ - sha_info->digest[0] += A; - sha_info->digest[1] += B; - sha_info->digest[2] += C; - sha_info->digest[3] += D; - sha_info->digest[4] += E; -#endif /* !UNRAVEL */ -} - -/* initialize the SHA digest */ - -static void -sha_init(SHAobject *sha_info) -{ - TestEndianness(sha_info->Endianness) - - sha_info->digest[0] = 0x67452301L; - sha_info->digest[1] = 0xefcdab89L; - sha_info->digest[2] = 0x98badcfeL; - sha_info->digest[3] = 0x10325476L; - sha_info->digest[4] = 0xc3d2e1f0L; - sha_info->count_lo = 0L; - sha_info->count_hi = 0L; - sha_info->local = 0; -} - -/* update the SHA digest */ - -static void -sha_update(SHAobject *sha_info, SHA_BYTE *buffer, int count) -{ - int i; - SHA_INT32 clo; - - clo = sha_info->count_lo + ((SHA_INT32) count << 3); - if (clo < sha_info->count_lo) { - ++sha_info->count_hi; - } - sha_info->count_lo = clo; - sha_info->count_hi += (SHA_INT32) count >> 29; - if (sha_info->local) { - i = SHA_BLOCKSIZE - sha_info->local; - if (i > count) { - i = count; - } - memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i); - count -= i; - buffer += i; - sha_info->local += i; - if (sha_info->local == SHA_BLOCKSIZE) { - sha_transform(sha_info); - } - else { - return; - } - } - while (count >= SHA_BLOCKSIZE) { - memcpy(sha_info->data, buffer, SHA_BLOCKSIZE); - buffer += SHA_BLOCKSIZE; - count -= SHA_BLOCKSIZE; - sha_transform(sha_info); - } - memcpy(sha_info->data, buffer, count); - sha_info->local = count; -} - -/* finish computing the SHA digest */ - -static void -sha_final(unsigned char digest[20], SHAobject *sha_info) -{ - int count; - SHA_INT32 lo_bit_count, hi_bit_count; - - lo_bit_count = sha_info->count_lo; - hi_bit_count = sha_info->count_hi; - count = (int) ((lo_bit_count >> 3) & 0x3f); - ((SHA_BYTE *) sha_info->data)[count++] = 0x80; - if (count > SHA_BLOCKSIZE - 8) { - memset(((SHA_BYTE *) sha_info->data) + count, 0, - SHA_BLOCKSIZE - count); - sha_transform(sha_info); - memset((SHA_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8); - } - else { - memset(((SHA_BYTE *) sha_info->data) + count, 0, - SHA_BLOCKSIZE - 8 - count); - } - - /* GJS: note that we add the hi/lo in big-endian. sha_transform will - swap these values into host-order. */ - sha_info->data[56] = (hi_bit_count >> 24) & 0xff; - sha_info->data[57] = (hi_bit_count >> 16) & 0xff; - sha_info->data[58] = (hi_bit_count >> 8) & 0xff; - sha_info->data[59] = (hi_bit_count >> 0) & 0xff; - sha_info->data[60] = (lo_bit_count >> 24) & 0xff; - sha_info->data[61] = (lo_bit_count >> 16) & 0xff; - sha_info->data[62] = (lo_bit_count >> 8) & 0xff; - sha_info->data[63] = (lo_bit_count >> 0) & 0xff; - sha_transform(sha_info); - digest[ 0] = (unsigned char) ((sha_info->digest[0] >> 24) & 0xff); - digest[ 1] = (unsigned char) ((sha_info->digest[0] >> 16) & 0xff); - digest[ 2] = (unsigned char) ((sha_info->digest[0] >> 8) & 0xff); - digest[ 3] = (unsigned char) ((sha_info->digest[0] ) & 0xff); - digest[ 4] = (unsigned char) ((sha_info->digest[1] >> 24) & 0xff); - digest[ 5] = (unsigned char) ((sha_info->digest[1] >> 16) & 0xff); - digest[ 6] = (unsigned char) ((sha_info->digest[1] >> 8) & 0xff); - digest[ 7] = (unsigned char) ((sha_info->digest[1] ) & 0xff); - digest[ 8] = (unsigned char) ((sha_info->digest[2] >> 24) & 0xff); - digest[ 9] = (unsigned char) ((sha_info->digest[2] >> 16) & 0xff); - digest[10] = (unsigned char) ((sha_info->digest[2] >> 8) & 0xff); - digest[11] = (unsigned char) ((sha_info->digest[2] ) & 0xff); - digest[12] = (unsigned char) ((sha_info->digest[3] >> 24) & 0xff); - digest[13] = (unsigned char) ((sha_info->digest[3] >> 16) & 0xff); - digest[14] = (unsigned char) ((sha_info->digest[3] >> 8) & 0xff); - digest[15] = (unsigned char) ((sha_info->digest[3] ) & 0xff); - digest[16] = (unsigned char) ((sha_info->digest[4] >> 24) & 0xff); - digest[17] = (unsigned char) ((sha_info->digest[4] >> 16) & 0xff); - digest[18] = (unsigned char) ((sha_info->digest[4] >> 8) & 0xff); - digest[19] = (unsigned char) ((sha_info->digest[4] ) & 0xff); -} - -/* - * End of copied SHA code. - * - * ------------------------------------------------------------------------ - */ - -static PyTypeObject SHAtype; - - -static SHAobject * -newSHAobject(void) -{ - return (SHAobject *)PyObject_New(SHAobject, &SHAtype); -} - -/* Internal methods for a hashing object */ - -static void -SHA_dealloc(PyObject *ptr) -{ - PyObject_Del(ptr); -} - - -/* External methods for a hashing object */ - -PyDoc_STRVAR(SHA_copy__doc__, "Return a copy of the hashing object."); - -static PyObject * -SHA_copy(SHAobject *self, PyObject *unused) -{ - SHAobject *newobj; - - if ( (newobj = newSHAobject())==NULL) - return NULL; - - SHAcopy(self, newobj); - return (PyObject *)newobj; -} - -PyDoc_STRVAR(SHA_digest__doc__, -"Return the digest value as a string of binary data."); - -static PyObject * -SHA_digest(SHAobject *self, PyObject *unused) -{ - unsigned char digest[SHA_DIGESTSIZE]; - SHAobject temp; - - SHAcopy(self, &temp); - sha_final(digest, &temp); - return PyString_FromStringAndSize((const char *)digest, sizeof(digest)); -} - -PyDoc_STRVAR(SHA_hexdigest__doc__, -"Return the digest value as a string of hexadecimal digits."); - -static PyObject * -SHA_hexdigest(SHAobject *self, PyObject *unused) -{ - unsigned char digest[SHA_DIGESTSIZE]; - SHAobject temp; - PyObject *retval; - char *hex_digest; - int i, j; - - /* Get the raw (binary) digest value */ - SHAcopy(self, &temp); - sha_final(digest, &temp); - - /* Create a new string */ - retval = PyString_FromStringAndSize(NULL, sizeof(digest) * 2); - if (!retval) - return NULL; - hex_digest = PyString_AsString(retval); - if (!hex_digest) { - Py_DECREF(retval); - return NULL; - } - - /* Make hex version of the digest */ - for(i=j=0; i> 4) & 0xf; - c = (c>9) ? c+'a'-10 : c + '0'; - hex_digest[j++] = c; - c = (digest[i] & 0xf); - c = (c>9) ? c+'a'-10 : c + '0'; - hex_digest[j++] = c; - } - return retval; -} - -PyDoc_STRVAR(SHA_update__doc__, -"Update this hashing object's state with the provided string."); - -static PyObject * -SHA_update(SHAobject *self, PyObject *args) -{ - unsigned char *cp; - int len; - - if (!PyArg_ParseTuple(args, "s#:update", &cp, &len)) - return NULL; - - sha_update(self, cp, len); - - Py_INCREF(Py_None); - return Py_None; -} - -static PyMethodDef SHA_methods[] = { - {"copy", (PyCFunction)SHA_copy, METH_NOARGS, SHA_copy__doc__}, - {"digest", (PyCFunction)SHA_digest, METH_NOARGS, SHA_digest__doc__}, - {"hexdigest", (PyCFunction)SHA_hexdigest, METH_NOARGS, SHA_hexdigest__doc__}, - {"update", (PyCFunction)SHA_update, METH_VARARGS, SHA_update__doc__}, - {NULL, NULL} /* sentinel */ -}; - -static PyObject * -SHA_get_block_size(PyObject *self, void *closure) -{ - return PyInt_FromLong(SHA_BLOCKSIZE); -} - -static PyObject * -SHA_get_digest_size(PyObject *self, void *closure) -{ - return PyInt_FromLong(SHA_DIGESTSIZE); -} - -static PyObject * -SHA_get_name(PyObject *self, void *closure) -{ - return PyString_FromStringAndSize("SHA1", 4); -} - -static PyGetSetDef SHA_getseters[] = { - {"digest_size", - (getter)SHA_get_digest_size, NULL, - NULL, - NULL}, - {"block_size", - (getter)SHA_get_block_size, NULL, - NULL, - NULL}, - {"name", - (getter)SHA_get_name, NULL, - NULL, - NULL}, - /* the old md5 and sha modules support 'digest_size' as in PEP 247. - * the old sha module also supported 'digestsize'. ugh. */ - {"digestsize", - (getter)SHA_get_digest_size, NULL, - NULL, - NULL}, - {NULL} /* Sentinel */ -}; - -static PyTypeObject SHAtype = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ - "_sha.sha", /*tp_name*/ - sizeof(SHAobject), /*tp_size*/ - 0, /*tp_itemsize*/ - /* methods */ - SHA_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - SHA_methods, /* tp_methods */ - 0, /* tp_members */ - SHA_getseters, /* tp_getset */ -}; - - -/* The single module-level function: new() */ - -PyDoc_STRVAR(SHA_new__doc__, -"Return a new SHA hashing object. An optional string argument\n\ -may be provided; if present, this string will be automatically\n\ -hashed."); - -static PyObject * -SHA_new(PyObject *self, PyObject *args, PyObject *kwdict) -{ - static char *kwlist[] = {"string", NULL}; - SHAobject *new; - unsigned char *cp = NULL; - int len; - - if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|s#:new", kwlist, - &cp, &len)) { - return NULL; - } - - if ((new = newSHAobject()) == NULL) - return NULL; - - sha_init(new); - - if (PyErr_Occurred()) { - Py_DECREF(new); - return NULL; - } - if (cp) - sha_update(new, cp, len); - - return (PyObject *)new; -} - - -/* List of functions exported by this module */ - -static struct PyMethodDef SHA_functions[] = { - {"new", (PyCFunction)SHA_new, METH_VARARGS|METH_KEYWORDS, SHA_new__doc__}, - {NULL, NULL} /* Sentinel */ -}; - - -/* Initialize this module. */ - -#define insint(n,v) { PyModule_AddIntConstant(m,n,v); } - -PyMODINIT_FUNC -init_sha(void) -{ - PyObject *m; - - SHAtype.ob_type = &PyType_Type; - if (PyType_Ready(&SHAtype) < 0) - return; - m = Py_InitModule("_sha", SHA_functions); - if (m == NULL) - return; - - /* Add some symbolic constants to the module */ - insint("blocksize", 1); /* For future use, in case some hash - functions require an integral number of - blocks */ - insint("digestsize", 20); - insint("digest_size", 20); -} Deleted: /python/branches/cpy_merge/Modules/timing.h ============================================================================== --- /python/branches/cpy_merge/Modules/timing.h Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1993 George V. Neville-Neil - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by George V. Neville-Neil - * 4. The name, George Neville-Neil may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _TIMING_H_ -#define _TIMING_H_ - -#ifdef TIME_WITH_SYS_TIME -#include -#include -#else /* !TIME_WITH_SYS_TIME */ -#ifdef HAVE_SYS_TIME_H -#include -#else /* !HAVE_SYS_TIME_H */ -#include -#endif /* !HAVE_SYS_TIME_H */ -#endif /* !TIME_WITH_SYS_TIME */ - -static struct timeval aftertp, beforetp; - -#define BEGINTIMING gettimeofday(&beforetp, NULL) - -#define ENDTIMING gettimeofday(&aftertp, NULL); \ - if(beforetp.tv_usec > aftertp.tv_usec) \ - { \ - aftertp.tv_usec += 1000000; \ - aftertp.tv_sec--; \ - } - -#define TIMINGUS (((aftertp.tv_sec - beforetp.tv_sec) * 1000000) + \ - (aftertp.tv_usec - beforetp.tv_usec)) - -#define TIMINGMS (((aftertp.tv_sec - beforetp.tv_sec) * 1000) + \ - ((aftertp.tv_usec - beforetp.tv_usec) / 1000)) - -#define TIMINGS ((aftertp.tv_sec - beforetp.tv_sec) + \ - (aftertp.tv_usec - beforetp.tv_usec) / 1000000) - -#endif /* _TIMING_H_ */ Deleted: /python/branches/cpy_merge/Modules/timingmodule.c ============================================================================== --- /python/branches/cpy_merge/Modules/timingmodule.c Tue Jun 5 01:44:17 2007 +++ (empty file) @@ -1,58 +0,0 @@ -/* - * Author: George V. Neville-Neil - */ - -#include "Python.h" - -/* Our stuff... */ -#include "timing.h" - -static PyObject * -start_timing(PyObject *self) -{ - Py_INCREF(Py_None); - BEGINTIMING; - return Py_None; -} - -static PyObject * -finish_timing(PyObject *self) -{ - ENDTIMING - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -seconds(PyObject *self) -{ - return PyInt_FromLong(TIMINGS); -} - -static PyObject * -milli(PyObject *self) -{ - return PyInt_FromLong(TIMINGMS); -} - -static PyObject * -micro(PyObject *self) -{ - return PyInt_FromLong(TIMINGUS); -} - - -static PyMethodDef timing_methods[] = { - {"start", (PyCFunction)start_timing, METH_NOARGS}, - {"finish", (PyCFunction)finish_timing, METH_NOARGS}, - {"seconds", (PyCFunction)seconds, METH_NOARGS}, - {"milli", (PyCFunction)milli, METH_NOARGS}, - {"micro", (PyCFunction)micro, METH_NOARGS}, - {NULL, NULL} -}; - - -PyMODINIT_FUNC inittiming(void) -{ - (void)Py_InitModule("timing", timing_methods); -} Modified: python/branches/cpy_merge/PC/WinMain.c ============================================================================== --- python/branches/cpy_merge/PC/WinMain.c (original) +++ python/branches/cpy_merge/PC/WinMain.c Tue Jun 5 01:44:17 2007 @@ -1,10 +1,10 @@ /* Minimal main program -- everything is loaded from the library. */ +#include "Python.h" + #define WIN32_LEAN_AND_MEAN #include -#include "Python.h" - int WINAPI WinMain( HINSTANCE hInstance, /* handle to current instance */ HINSTANCE hPrevInstance, /* handle to previous instance */ Modified: python/branches/cpy_merge/PC/_winreg.c ============================================================================== --- python/branches/cpy_merge/PC/_winreg.c (original) +++ python/branches/cpy_merge/PC/_winreg.c Tue Jun 5 01:44:17 2007 @@ -12,10 +12,10 @@ */ -#include "windows.h" #include "Python.h" #include "structmember.h" #include "malloc.h" /* for alloca */ +#include "windows.h" static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); static PyObject *PyHKEY_FromHKEY(HKEY h); Modified: python/branches/cpy_merge/PC/dl_nt.c ============================================================================== --- python/branches/cpy_merge/PC/dl_nt.c (original) +++ python/branches/cpy_merge/PC/dl_nt.c Tue Jun 5 01:44:17 2007 @@ -7,11 +7,9 @@ forgotten) from the programmer. */ -#include "windows.h" -/* NT and Python share these */ -#include "pyconfig.h" #include "Python.h" +#include "windows.h" char dllVersionBuffer[16] = ""; // a private buffer Modified: python/branches/cpy_merge/PC/os2emx/Makefile ============================================================================== --- python/branches/cpy_merge/PC/os2emx/Makefile (original) +++ python/branches/cpy_merge/PC/os2emx/Makefile Tue Jun 5 01:44:17 2007 @@ -300,12 +300,8 @@ Modules/itertoolsmodule.c \ Modules/_localemodule.c \ Modules/mathmodule.c \ - Modules/md5.c \ - Modules/md5module.c \ Modules/operator.c \ Modules/_randommodule.c \ - Modules/rgbimgmodule.c \ - Modules/shamodule.c \ Modules/sha256module.c \ Modules/sha512module.c \ Modules/_sre.c \ @@ -313,7 +309,6 @@ Modules/symtablemodule.c \ Modules/termios.c \ Modules/timemodule.c \ - Modules/timingmodule.c \ Modules/_weakref.c \ Modules/xxsubtype.c \ Modules/zipimport.c) Modified: python/branches/cpy_merge/PC/os2emx/config.c ============================================================================== --- python/branches/cpy_merge/PC/os2emx/config.c (original) +++ python/branches/cpy_merge/PC/os2emx/config.c Tue Jun 5 01:44:17 2007 @@ -65,14 +65,12 @@ extern void initmath(); extern void init_md5(); extern void initoperator(); -extern void initrgbimg(); extern void init_sha(); extern void init_sha256(); extern void init_sha512(); extern void init_struct(); extern void inittermios(); extern void inittime(); -extern void inittiming(); extern void initxxsubtype(); extern void initzipimport(); #if !HAVE_DYNAMIC_LOADING @@ -127,16 +125,12 @@ {"imageop", initimageop}, {"itertools", inititertools}, {"math", initmath}, - {"_md5", init_md5}, {"operator", initoperator}, - {"rgbimg", initrgbimg}, - {"_sha", init_sha}, {"_sha256", init_sha256}, {"_sha512", init_sha512}, {"_struct", init_struct}, {"termios", inittermios}, {"time", inittime}, - {"timing", inittiming}, {"xxsubtype", initxxsubtype}, {"zipimport", initzipimport}, #if !HAVE_DYNAMIC_LOADING Modified: python/branches/cpy_merge/PC/os2emx/python25.def ============================================================================== --- python/branches/cpy_merge/PC/os2emx/python25.def (original) +++ python/branches/cpy_merge/PC/os2emx/python25.def Tue Jun 5 01:44:17 2007 @@ -1255,26 +1255,12 @@ ; From python25_s.lib(mathmodule) ; "initmath" -; From python25_s.lib(md5) - "md5_finish" - "md5_init" - "md5_append" - -; From python25_s.lib(md5module) -; "init_md5" - ; From python25_s.lib(operator) ; "initoperator" ; From python25_s.lib(_randommodule) ; "init_random" -; From python25_s.lib(rgbimgmodule) -; "initrgbimg" - -; From python25_s.lib(shamodule) -; "init_sha" - ; From python25_s.lib(sha256module) ; "init_sha256" @@ -1298,9 +1284,6 @@ "_PyTime_DoubleToTimet" ; "inittimezone" -; From python25_s.lib(timingmodule) -; "inittiming" - ; From python25_s.lib(_weakref) ; "init_weakref" Modified: python/branches/cpy_merge/PC/os2vacpp/makefile ============================================================================== --- python/branches/cpy_merge/PC/os2vacpp/makefile (original) +++ python/branches/cpy_merge/PC/os2vacpp/makefile Tue Jun 5 01:44:17 2007 @@ -371,19 +371,6 @@ $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h -almodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - arraymodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -439,46 +426,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -cdmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - -cgensupport.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ - $(PY_MODULES)\cgensupport.h $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h \ - $(PY_INCLUDE)\complexobject.h pyconfig.h $(PY_INCLUDE)\dictobject.h \ - $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h \ - $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h \ - $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - -clmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - cmathmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -616,33 +563,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -flmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\structmember.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ - $(PY_INCLUDE)\tupleobject.h - -fmmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - fpectlmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -700,20 +620,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -glmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_MODULES)\cgensupport.h \ - $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ - pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ - $(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \ - $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h \ - $(PY_INCLUDE)\longobject.h $(PY_INCLUDE)\methodobject.h \ - $(PY_INCLUDE)\modsupport.h $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h \ - $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h \ - $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h \ - $(PY_INCLUDE)\pystate.h $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h \ - $(PY_INCLUDE)\rangeobject.h $(PY_INCLUDE)\sliceobject.h \ - $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ - $(PY_INCLUDE)\tupleobject.h - grpmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ @@ -741,19 +647,6 @@ $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h -imgfile.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - main.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ @@ -781,21 +674,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -md5c.obj: pyconfig.h $(PY_MODULES)\md5.h - -md5module.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_MODULES)\md5.h $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - mpzmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -852,20 +730,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\token.h \ $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h -pcremodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_MODULES)\pcre-internal.h \ - $(PY_MODULES)\pcre.h $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\pyerrors.h \ - $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h $(PY_INCLUDE)\python.h \ - $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h $(PY_INCLUDE)\sliceobject.h \ - $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ - $(PY_INCLUDE)\tupleobject.h - posix.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ @@ -894,19 +758,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -puremodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - pwdmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ @@ -921,20 +772,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -pypcre.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\graminit.h $(PY_INCLUDE)\import.h \ - $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h \ - $(PY_INCLUDE)\longobject.h $(PY_INCLUDE)\methodobject.h \ - $(PY_INCLUDE)\modsupport.h $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h \ - $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h \ - $(PY_MODULES)\pcre-internal.h $(PY_MODULES)\pcre.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - readline.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ @@ -962,20 +799,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -rgbimgmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ - $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ - pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ - $(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \ - $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h \ - $(PY_INCLUDE)\longobject.h $(PY_INCLUDE)\methodobject.h \ - $(PY_INCLUDE)\modsupport.h $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h \ - $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h \ - $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h \ - $(PY_INCLUDE)\pystate.h $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h \ - $(PY_INCLUDE)\rangeobject.h $(PY_INCLUDE)\sliceobject.h \ - $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ - $(PY_INCLUDE)\tupleobject.h - selectmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -990,19 +813,6 @@ $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h -sgimodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - signalmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -1032,33 +842,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -soundex.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ - $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ - $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ - $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h \ - $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - -stdwinmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ - $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ - pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ - $(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \ - $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h \ - $(PY_INCLUDE)\longobject.h $(PY_INCLUDE)\methodobject.h \ - $(PY_INCLUDE)\modsupport.h $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h \ - $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h \ - $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h \ - $(PY_INCLUDE)\pystate.h $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h \ - $(PY_INCLUDE)\rangeobject.h $(PY_INCLUDE)\sliceobject.h \ - $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ - $(PY_INCLUDE)\tupleobject.h - structmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -1087,21 +870,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\structmember.h \ $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h -svmodule.obj: $(PY_INCLUDE)\abstract.h $(OS2TCPIP)\Include\sys\time.h $(PY_INCLUDE)\ceval.h \ - $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\compile.h \ - $(PY_INCLUDE)\complexobject.h pyconfig.h $(PY_INCLUDE)\dictobject.h \ - $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h \ - $(PY_INCLUDE)\import.h $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h \ - $(PY_INCLUDE)\listobject.h $(PY_INCLUDE)\longobject.h \ - $(PY_INCLUDE)\methodobject.h $(PY_INCLUDE)\modsupport.h \ - $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h $(PY_INCLUDE)\myproto.h \ - $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h $(PY_INCLUDE)\pydebug.h \ - $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h $(PY_INCLUDE)\pystate.h \ - $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h $(PY_INCLUDE)\rangeobject.h \ - $(PY_INCLUDE)\sliceobject.h $(PY_INCLUDE)\stringobject.h \ - $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h \ - $(PY_MODULES)\yuv.h - syslogmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ @@ -1157,20 +925,6 @@ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -timingmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ - $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ - pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ - $(PY_INCLUDE)\floatobject.h $(PY_INCLUDE)\funcobject.h $(PY_INCLUDE)\import.h \ - $(PY_INCLUDE)\intobject.h $(PY_INCLUDE)\intrcheck.h $(PY_INCLUDE)\listobject.h \ - $(PY_INCLUDE)\longobject.h $(PY_INCLUDE)\methodobject.h \ - $(PY_INCLUDE)\modsupport.h $(PY_INCLUDE)\moduleobject.h $(PY_INCLUDE)\mymalloc.h \ - $(PY_INCLUDE)\myproto.h $(PY_INCLUDE)\object.h $(PY_INCLUDE)\objimpl.h \ - $(PY_INCLUDE)\pydebug.h $(PY_INCLUDE)\pyerrors.h $(PY_INCLUDE)\pyfpe.h \ - $(PY_INCLUDE)\pystate.h $(PY_INCLUDE)\python.h $(PY_INCLUDE)\pythonrun.h \ - $(PY_INCLUDE)\rangeobject.h $(PY_INCLUDE)\sliceobject.h \ - $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_MODULES)\timing.h \ - $(PY_INCLUDE)\traceback.h $(PY_INCLUDE)\tupleobject.h - xxmodule.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h $(PY_INCLUDE)\classobject.h \ $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h pyconfig.h \ $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h $(PY_INCLUDE)\floatobject.h \ Modified: python/branches/cpy_merge/PC/os2vacpp/makefile.omk ============================================================================== --- python/branches/cpy_merge/PC/os2vacpp/makefile.omk (original) +++ python/branches/cpy_merge/PC/os2vacpp/makefile.omk Tue Jun 5 01:44:17 2007 @@ -170,45 +170,30 @@ # Omitted Modules (and Description/Reason): # # Multimedia: - # almodule.c -- Non-OS/2 Audio Channel Facility (?) - # cdmodule.c -- Wrapper of Non-OS/2 CD Audio Functions # audioop.c -- Various Compute Operations on Audio Samples # imageop.c -- Various Compute Operations on Video Samples - # imgfile.c -- Wrapper of SGI ImageLib API - # rgbimgmodule.c -- Non-OS/2 Image Read/Write Capability (Primitive) # sunaudiodev.c -- Wrapper of Sun Audio Device API - # clmodule.c -- Wrapper of SGI Image/Audio Compression API # Database: # dbmmodule.c -- Wrapper of DBM Database API (Generic Flavor) - # bsddbmodule.c -- Wrapper of DBM Database API (BSD Flavor) # gdbmmodule.c -- Wrapper of DBM Database API (GNU Flavor) # Cryptography: # cryptmodule.c -- Simple Wrapper for crypt() Function - # rotormodule.c -- Implementation of Enigma Crypto Based on Rotors -# cgensupport.obj \ # fcntlmodule.obj \ -# fmmodule.obj \ # fpectlmodule.obj \ # fpetestmodule.obj \ # Unix-Specific getpath.obj \ -# glmodule.obj \ # grpmodule.obj \ # mpzmodule.obj \ # nismodule.obj \ # parsermodule.obj \ -# pcremodule.obj \ # pwdmodule.obj \ -# pypcre.obj \ # readline.obj \ # resource.obj \ -# sgimodule.obj \ -# svmodule.obj \ # syslogmodule.obj \ # termios.obj \ -# timingmodule.obj \ # User Interface: # _tkinter.obj \ @@ -358,14 +343,6 @@ pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ traceback.h tupleobject.h -almodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - arraymodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -398,30 +375,6 @@ pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ traceback.h tupleobject.h -cdmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - -cgensupport.obj: abstract.h ceval.h cgensupport.h classobject.h cobject.h \ - complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ - funcobject.h import.h intobject.h intrcheck.h listobject.h \ - longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \ - myproto.h object.h objimpl.h pydebug.h pyerrors.h pyfpe.h \ - pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h traceback.h tupleobject.h - -clmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - cmathmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -502,22 +455,6 @@ pyerrors.h pyfpe.h pystate.h python.h pythonrun.h rangeobject.h \ sliceobject.h stringobject.h sysmodule.h traceback.h tupleobject.h -flmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h \ - structmember.h sysmodule.h traceback.h tupleobject.h - -fmmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - fpectlmodule.obj: abstract.h ceval.h classobject.h cobject.h \ complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ funcobject.h import.h intobject.h intrcheck.h listobject.h \ @@ -552,14 +489,6 @@ python.h pythonrun.h rangeobject.h sliceobject.h stringobject.h \ sysmodule.h traceback.h tupleobject.h -glmodule.obj: abstract.h ceval.h cgensupport.h classobject.h cobject.h \ - complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ - funcobject.h import.h intobject.h intrcheck.h listobject.h \ - longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \ - myproto.h object.h objimpl.h pydebug.h pyerrors.h pyfpe.h \ - pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h traceback.h tupleobject.h - grpmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ grp.h import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -576,14 +505,6 @@ pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ traceback.h tupleobject.h -imgfile.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - main.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -600,16 +521,6 @@ pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ stringobject.h sysmodule.h traceback.h tupleobject.h -md5c.obj: pyconfig.h md5.h - -md5module.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h md5.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - mpzmodule.obj: abstract.h ceval.h classobject.h cobject.h \ complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ funcobject.h import.h intobject.h intrcheck.h listobject.h \ @@ -643,14 +554,6 @@ rangeobject.h sliceobject.h stringobject.h sysmodule.h token.h \ traceback.h tupleobject.h -pcremodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pcre-internal.h pcre.h pydebug.h pyerrors.h \ - pyfpe.h pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h traceback.h tupleobject.h - posix.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -667,14 +570,6 @@ python.h pythonrun.h rangeobject.h sliceobject.h stringobject.h \ sysmodule.h traceback.h tupleobject.h -puremodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - pwdmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -683,14 +578,6 @@ python.h pythonrun.h rangeobject.h sliceobject.h stringobject.h \ sysmodule.h traceback.h tupleobject.h -pypcre.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - graminit.h import.h intobject.h intrcheck.h listobject.h \ - longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \ - myproto.h object.h objimpl.h pcre-internal.h pcre.h pydebug.h \ - pyerrors.h pyfpe.h pystate.h python.h pythonrun.h rangeobject.h \ - sliceobject.h stringobject.h sysmodule.h traceback.h tupleobject.h - readline.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ @@ -707,22 +594,6 @@ pyerrors.h pyfpe.h pystate.h python.h pythonrun.h rangeobject.h \ sliceobject.h stringobject.h sysmodule.h traceback.h tupleobject.h -rgbimgmodule.obj: abstract.h ceval.h classobject.h cobject.h \ - complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ - funcobject.h import.h intobject.h intrcheck.h listobject.h \ - longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \ - myproto.h object.h objimpl.h pydebug.h pyerrors.h pyfpe.h \ - pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h traceback.h tupleobject.h - -rotormodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h mymath.h \ - myproto.h object.h objimpl.h pydebug.h pyerrors.h pyfpe.h \ - pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h traceback.h tupleobject.h - selectmodule.obj: abstract.h ceval.h classobject.h cobject.h \ complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ funcobject.h import.h intobject.h intrcheck.h listobject.h \ @@ -731,14 +602,6 @@ pyerrors.h pyfpe.h pystate.h python.h pythonrun.h rangeobject.h \ sliceobject.h stringobject.h sysmodule.h traceback.h tupleobject.h -sgimodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - signalmodule.obj: abstract.h ceval.h classobject.h cobject.h \ complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ funcobject.h import.h intobject.h intrcheck.h listobject.h \ @@ -756,22 +619,6 @@ pyfpe.h pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ stringobject.h sysmodule.h traceback.h tupleobject.h -soundex.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ - pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ - import.h intobject.h intrcheck.h listobject.h longobject.h \ - methodobject.h modsupport.h moduleobject.h mymalloc.h myproto.h \ - object.h objimpl.h pydebug.h pyerrors.h pyfpe.h pystate.h python.h \ - pythonrun.h rangeobject.h sliceobject.h stringobject.h sysmodule.h \ - traceback.h tupleobject.h - -stdwinmodule.obj: abstract.h ceval.h classobject.h cobject.h \ - complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ - funcobject.h import.h intobject.h intrcheck.h listobject.h \ - longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \ - myproto.h object.h objimpl.h pydebug.h pyerrors.h pyfpe.h \ - pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h traceback.h tupleobject.h - structmodule.obj: abstract.h ceval.h classobject.h cobject.h \ complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ funcobject.h import.h intobject.h intrcheck.h listobject.h \ @@ -789,15 +636,6 @@ sliceobject.h stringobject.h structmember.h sysmodule.h \ traceback.h tupleobject.h -svmodule.obj: abstract.h c:\mptn\include\sys\time.h ceval.h classobject.h \ - cobject.h compile.h complexobject.h pyconfig.h dictobject.h \ - fileobject.h floatobject.h funcobject.h import.h intobject.h \ - intrcheck.h listobject.h longobject.h methodobject.h modsupport.h \ - moduleobject.h mymalloc.h myproto.h object.h objimpl.h pydebug.h \ - pyerrors.h pyfpe.h pystate.h python.h pythonrun.h rangeobject.h \ - sliceobject.h stringobject.h sysmodule.h traceback.h tupleobject.h \ - yuv.h - syslogmodule.obj: abstract.h ceval.h classobject.h cobject.h \ complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ funcobject.h import.h intobject.h intrcheck.h listobject.h \ @@ -830,14 +668,6 @@ python.h pythonrun.h rangeobject.h sliceobject.h stringobject.h \ sysmodule.h traceback.h tupleobject.h -timingmodule.obj: abstract.h ceval.h classobject.h cobject.h \ - complexobject.h pyconfig.h dictobject.h fileobject.h floatobject.h \ - funcobject.h import.h intobject.h intrcheck.h listobject.h \ - longobject.h methodobject.h modsupport.h moduleobject.h mymalloc.h \ - myproto.h object.h objimpl.h pydebug.h pyerrors.h pyfpe.h \ - pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ - stringobject.h sysmodule.h timing.h traceback.h tupleobject.h - xxmodule.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ Modified: python/branches/cpy_merge/PC/pyconfig.h ============================================================================== --- python/branches/cpy_merge/PC/pyconfig.h (original) +++ python/branches/cpy_merge/PC/pyconfig.h Tue Jun 5 01:44:17 2007 @@ -491,22 +491,13 @@ /* Define if you want to have a Unicode type. */ #define Py_USING_UNICODE -/* Define as the integral type used for Unicode representation. */ -#define PY_UNICODE_TYPE unsigned short - /* Define as the size of the unicode type. */ -#define Py_UNICODE_SIZE SIZEOF_SHORT - -/* Define if you have a useable wchar_t type defined in wchar.h; useable - means wchar_t must be 16-bit unsigned type. (see - Include/unicodeobject.h). */ -#if Py_UNICODE_SIZE == 2 -#define HAVE_USABLE_WCHAR_T +/* This is enough for unicodeobject.h to do the "right thing" on Windows. */ +#define Py_UNICODE_SIZE 2 /* Define to indicate that the Python Unicode representation can be passed as-is to Win32 Wide API. */ #define Py_WIN_WIDE_FILENAMES -#endif /* Use Python's own small-block memory-allocator. */ #define WITH_PYMALLOC 1 Modified: python/branches/cpy_merge/PC/winsound.c ============================================================================== --- python/branches/cpy_merge/PC/winsound.c (original) +++ python/branches/cpy_merge/PC/winsound.c Tue Jun 5 01:44:17 2007 @@ -35,9 +35,9 @@ winsound.PlaySound(None, 0) */ +#include #include #include -#include #ifdef HAVE_CONIO_H #include /* port functions on Win9x */ #endif Modified: python/branches/cpy_merge/PCbuild/pythoncore.vcproj ============================================================================== --- python/branches/cpy_merge/PCbuild/pythoncore.vcproj (original) +++ python/branches/cpy_merge/PCbuild/pythoncore.vcproj Tue Jun 5 01:44:17 2007 @@ -626,12 +626,6 @@ RelativePath="..\Modules\mathmodule.c"> - - - - - - - - Modified: python/branches/cpy_merge/Python/ast.c ============================================================================== --- python/branches/cpy_merge/Python/ast.c (original) +++ python/branches/cpy_merge/Python/ast.c Tue Jun 5 01:44:17 2007 @@ -324,6 +324,29 @@ } } +static const char* FORBIDDEN[] = { + "None", + "True", + "False", + NULL, +}; + +static int +forbidden_name(expr_ty e, const node *n) +{ + const char *id; + const char **p; + assert(PyString_Check(e->v.Name.id)); + id = PyString_AS_STRING(e->v.Name.id); + for (p = FORBIDDEN; *p; p++) { + if (strcmp(*p, id) == 0) { + ast_error(n, "assignment to keyword"); + return 1; + } + } + return 0; +} + /* Set the context ctx for expr_ty e, recursively traversing e. Only sets context for expr kinds that "can appear in assignment context" @@ -366,9 +389,9 @@ return 0; break; case Name_kind: - if (ctx == Store && - !strcmp(PyString_AS_STRING(e->v.Name.id), "None")) { - return ast_error(n, "assignment to None"); + if (ctx == Store) { + if (forbidden_name(e, n)) + return 0; /* forbidden_name() calls ast_error() */ } e->v.Name.ctx = ctx; break; @@ -1227,6 +1250,7 @@ { /* atom: '(' [yield_expr|testlist_comp] ')' | '[' [testlist_comp] ']' | '{' [dictmaker|testlist_comp] '}' | NAME | NUMBER | STRING+ + | '...' | 'None' | 'True' | 'False' */ node *ch = CHILD(n, 0); int bytesmode = 0; @@ -1894,7 +1918,9 @@ } else if (e->kind != Name_kind) { ast_error(CHILD(ch, 0), "keyword can't be an expression"); return NULL; - } + } else if (forbidden_name(e, ch)) { + return NULL; + } key = e->v.Name.id; e = ast_for_expr(c, CHILD(ch, 2)); if (!e) @@ -1981,11 +2007,8 @@ "expression not possible"); return NULL; case Name_kind: { - const char *var_name = PyString_AS_STRING(expr1->v.Name.id); - if (var_name[0] == 'N' && !strcmp(var_name, "None")) { - ast_error(ch, "assignment to None"); + if (forbidden_name(expr1, ch)) return NULL; - } break; } case Attribute_kind: Modified: python/branches/cpy_merge/Python/bltinmodule.c ============================================================================== --- python/branches/cpy_merge/Python/bltinmodule.c (original) +++ python/branches/cpy_merge/Python/bltinmodule.c Tue Jun 5 01:44:17 2007 @@ -1683,17 +1683,6 @@ On Unix, GNU readline is used if enabled. The prompt string, if given,\n\ is printed without a trailing newline before reading."); -static PyObject * -builtin_reload(PyObject *self, PyObject *v) -{ - return PyImport_ReloadModule(v); -} - -PyDoc_STRVAR(reload_doc, -"reload(module) -> module\n\ -\n\ -Reload the module. The module must have been successfully imported before."); - static PyObject * builtin_repr(PyObject *self, PyObject *v) @@ -1991,7 +1980,6 @@ {"ord", builtin_ord, METH_O, ord_doc}, {"pow", builtin_pow, METH_VARARGS, pow_doc}, {"print", (PyCFunction)builtin_print, METH_VARARGS | METH_KEYWORDS, print_doc}, - {"reload", builtin_reload, METH_O, reload_doc}, {"repr", builtin_repr, METH_O, repr_doc}, {"round", (PyCFunction)builtin_round, METH_VARARGS | METH_KEYWORDS, round_doc}, {"setattr", builtin_setattr, METH_VARARGS, setattr_doc}, Modified: python/branches/cpy_merge/Python/ceval.c ============================================================================== --- python/branches/cpy_merge/Python/ceval.c (original) +++ python/branches/cpy_merge/Python/ceval.c Tue Jun 5 01:44:17 2007 @@ -2941,10 +2941,6 @@ Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); - /* For b/w compatibility */ - PySys_SetObject("exc_type", type); - PySys_SetObject("exc_value", value); - PySys_SetObject("exc_traceback", tb); } static void @@ -2975,11 +2971,6 @@ Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); - /* For b/w compatibility */ - PySys_SetObject("exc_type", frame->f_exc_type); - PySys_SetObject("exc_value", frame->f_exc_value); - PySys_SetObject("exc_traceback", frame->f_exc_traceback); - /* Clear the frame's exception info. */ tmp_type = frame->f_exc_type; tmp_value = frame->f_exc_value; Modified: python/branches/cpy_merge/Python/dynload_win.c ============================================================================== --- python/branches/cpy_merge/Python/dynload_win.c (original) +++ python/branches/cpy_merge/Python/dynload_win.c Tue Jun 5 01:44:17 2007 @@ -1,7 +1,6 @@ /* Support for dynamic loading of extension modules */ -#include #ifdef HAVE_DIRECT_H #include #endif @@ -9,6 +8,7 @@ #include "Python.h" #include "importdl.h" +#include const struct filedescr _PyImport_DynLoadFiletab[] = { #ifdef _DEBUG Modified: python/branches/cpy_merge/Python/graminit.c ============================================================================== --- python/branches/cpy_merge/Python/graminit.c (original) +++ python/branches/cpy_merge/Python/graminit.c Tue Jun 5 01:44:17 2007 @@ -1285,7 +1285,7 @@ {1, arcs_62_2}, {1, arcs_62_3}, }; -static arc arcs_63_0[7] = { +static arc arcs_63_0[10] = { {13, 1}, {146, 2}, {148, 3}, @@ -1293,6 +1293,9 @@ {151, 4}, {152, 5}, {77, 4}, + {153, 4}, + {154, 4}, + {155, 4}, }; static arc arcs_63_1[3] = { {46, 6}, @@ -1324,7 +1327,7 @@ {150, 4}, }; static state states_63[9] = { - {7, arcs_63_0}, + {10, arcs_63_0}, {3, arcs_63_1}, {2, arcs_63_2}, {2, arcs_63_3}, @@ -1338,7 +1341,7 @@ {24, 1}, }; static arc arcs_64_1[3] = { - {153, 2}, + {156, 2}, {30, 3}, {0, 1}, }; @@ -1370,7 +1373,7 @@ {15, 5}, }; static arc arcs_65_2[1] = { - {154, 6}, + {157, 6}, }; static arc arcs_65_3[1] = { {21, 5}, @@ -1394,14 +1397,14 @@ {1, arcs_65_6}, }; static arc arcs_66_0[1] = { - {155, 1}, + {158, 1}, }; static arc arcs_66_1[2] = { {30, 2}, {0, 1}, }; static arc arcs_66_2[2] = { - {155, 1}, + {158, 1}, {0, 2}, }; static state states_66[3] = { @@ -1419,11 +1422,11 @@ }; static arc arcs_67_2[3] = { {24, 3}, - {156, 4}, + {159, 4}, {0, 2}, }; static arc arcs_67_3[2] = { - {156, 4}, + {159, 4}, {0, 3}, }; static arc arcs_67_4[1] = { @@ -1488,7 +1491,7 @@ }; static arc arcs_71_1[4] = { {25, 2}, - {153, 3}, + {156, 3}, {30, 4}, {0, 1}, }; @@ -1529,7 +1532,7 @@ {1, arcs_71_8}, }; static arc arcs_72_0[1] = { - {157, 1}, + {160, 1}, }; static arc arcs_72_1[1] = { {21, 2}, @@ -1565,7 +1568,7 @@ {1, arcs_72_7}, }; static arc arcs_73_0[3] = { - {158, 1}, + {161, 1}, {31, 2}, {32, 3}, }; @@ -1580,7 +1583,7 @@ {24, 6}, }; static arc arcs_73_4[4] = { - {158, 1}, + {161, 1}, {31, 2}, {32, 3}, {0, 4}, @@ -1609,7 +1612,7 @@ {24, 1}, }; static arc arcs_74_1[3] = { - {153, 2}, + {156, 2}, {29, 3}, {0, 1}, }; @@ -1626,8 +1629,8 @@ {1, arcs_74_3}, }; static arc arcs_75_0[2] = { - {153, 1}, - {160, 1}, + {156, 1}, + {163, 1}, }; static arc arcs_75_1[1] = { {0, 1}, @@ -1649,7 +1652,7 @@ {105, 4}, }; static arc arcs_76_4[2] = { - {159, 5}, + {162, 5}, {0, 4}, }; static arc arcs_76_5[1] = { @@ -1670,7 +1673,7 @@ {107, 2}, }; static arc arcs_77_2[2] = { - {159, 3}, + {162, 3}, {0, 2}, }; static arc arcs_77_3[1] = { @@ -1704,7 +1707,7 @@ {1, arcs_79_1}, }; static arc arcs_80_0[1] = { - {163, 1}, + {166, 1}, }; static arc arcs_80_1[2] = { {9, 2}, @@ -1720,11 +1723,11 @@ }; static dfa dfas[81] = { {256, "single_input", 0, 3, states_0, - "\004\050\060\200\000\000\000\050\170\052\034\144\011\040\004\000\200\041\224\041\010"}, + "\004\050\060\200\000\000\000\050\170\052\034\144\011\040\004\000\200\041\224\017\101"}, {257, "file_input", 0, 2, states_1, - "\204\050\060\200\000\000\000\050\170\052\034\144\011\040\004\000\200\041\224\041\010"}, + "\204\050\060\200\000\000\000\050\170\052\034\144\011\040\004\000\200\041\224\017\101"}, {258, "eval_input", 0, 3, states_2, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {259, "decorator", 0, 7, states_3, "\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {260, "decorators", 0, 2, states_4, @@ -1744,13 +1747,13 @@ {267, "vfpdef", 0, 2, states_11, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {268, "stmt", 0, 2, states_12, - "\000\050\060\200\000\000\000\050\170\052\034\144\011\040\004\000\200\041\224\041\010"}, + "\000\050\060\200\000\000\000\050\170\052\034\144\011\040\004\000\200\041\224\017\101"}, {269, "simple_stmt", 0, 4, states_13, - "\000\040\040\200\000\000\000\050\170\052\034\000\000\040\004\000\200\041\224\001\010"}, + "\000\040\040\200\000\000\000\050\170\052\034\000\000\040\004\000\200\041\224\017\100"}, {270, "small_stmt", 0, 2, states_14, - "\000\040\040\200\000\000\000\050\170\052\034\000\000\040\004\000\200\041\224\001\010"}, + "\000\040\040\200\000\000\000\050\170\052\034\000\000\040\004\000\200\041\224\017\100"}, {271, "expr_stmt", 0, 6, states_15, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {272, "augassign", 0, 2, states_16, "\000\000\000\000\000\200\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {273, "del_stmt", 0, 3, states_17, @@ -1758,7 +1761,7 @@ {274, "pass_stmt", 0, 2, states_18, "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {275, "flow_stmt", 0, 2, states_19, - "\000\000\000\000\000\000\000\000\170\000\000\000\000\000\000\000\000\000\000\000\010"}, + "\000\000\000\000\000\000\000\000\170\000\000\000\000\000\000\000\000\000\000\000\100"}, {276, "break_stmt", 0, 2, states_20, "\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000"}, {277, "continue_stmt", 0, 2, states_21, @@ -1766,7 +1769,7 @@ {278, "return_stmt", 0, 3, states_22, "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000"}, {279, "yield_stmt", 0, 2, states_23, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100"}, {280, "raise_stmt", 0, 7, states_24, "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000"}, {281, "import_stmt", 0, 2, states_25, @@ -1792,7 +1795,7 @@ {291, "assert_stmt", 0, 5, states_35, "\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"}, {292, "compound_stmt", 0, 2, states_36, - "\000\010\020\000\000\000\000\000\000\000\000\144\011\000\000\000\000\000\000\040\000"}, + "\000\010\020\000\000\000\000\000\000\000\000\144\011\000\000\000\000\000\000\000\001"}, {293, "if_stmt", 0, 8, states_37, "\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000"}, {294, "while_stmt", 0, 8, states_38, @@ -1808,67 +1811,67 @@ {299, "except_clause", 0, 5, states_43, "\000\000\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000"}, {300, "suite", 0, 5, states_44, - "\004\040\040\200\000\000\000\050\170\052\034\000\000\040\004\000\200\041\224\001\010"}, + "\004\040\040\200\000\000\000\050\170\052\034\000\000\040\004\000\200\041\224\017\100"}, {301, "test", 0, 6, states_45, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {302, "test_nocond", 0, 2, states_46, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {303, "lambdef", 0, 5, states_47, "\000\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000"}, {304, "lambdef_nocond", 0, 5, states_48, "\000\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000"}, {305, "or_test", 0, 2, states_49, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\004\000\200\041\224\017\000"}, {306, "and_test", 0, 2, states_50, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\004\000\200\041\224\017\000"}, {307, "not_test", 0, 3, states_51, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\004\000\200\041\224\017\000"}, {308, "comparison", 0, 2, states_52, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {309, "comp_op", 0, 4, states_53, "\000\000\000\000\000\000\000\000\000\000\000\200\000\000\304\037\000\000\000\000\000"}, {310, "star_expr", 0, 3, states_54, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {311, "expr", 0, 2, states_55, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {312, "xor_expr", 0, 2, states_56, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {313, "and_expr", 0, 2, states_57, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {314, "shift_expr", 0, 2, states_58, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {315, "arith_expr", 0, 2, states_59, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {316, "term", 0, 2, states_60, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {317, "factor", 0, 3, states_61, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {318, "power", 0, 4, states_62, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\224\017\000"}, {319, "atom", 0, 9, states_63, - "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\224\001\000"}, + "\000\040\040\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\224\017\000"}, {320, "testlist_comp", 0, 5, states_64, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {321, "trailer", 0, 7, states_65, "\000\040\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\004\000\000"}, {322, "subscriptlist", 0, 3, states_66, - "\000\040\040\202\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\202\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {323, "subscript", 0, 5, states_67, - "\000\040\040\202\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\202\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {324, "sliceop", 0, 3, states_68, "\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {325, "exprlist", 0, 3, states_69, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\000\000\000\200\041\224\017\000"}, {326, "testlist", 0, 3, states_70, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {327, "dictorsetmaker", 0, 9, states_71, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {328, "classdef", 0, 8, states_72, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\040\000"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001"}, {329, "arglist", 0, 8, states_73, - "\000\040\040\200\001\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\001\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {330, "argument", 0, 4, states_74, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {331, "comp_iter", 0, 2, states_75, "\000\000\000\000\000\000\000\000\000\000\000\104\000\000\000\000\000\000\000\000\000"}, {332, "comp_for", 0, 6, states_76, @@ -1876,13 +1879,13 @@ {333, "comp_if", 0, 4, states_77, "\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000"}, {334, "testlist1", 0, 2, states_78, - "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\001\000"}, + "\000\040\040\200\000\000\000\000\000\040\000\000\000\040\004\000\200\041\224\017\000"}, {335, "encoding_decl", 0, 2, states_79, "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"}, {336, "yield_expr", 0, 3, states_80, - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010"}, + "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100"}, }; -static label labels[164] = { +static label labels[167] = { {0, "EMPTY"}, {256, 0}, {4, 0}, @@ -2036,6 +2039,9 @@ {27, 0}, {2, 0}, {3, 0}, + {1, "None"}, + {1, "True"}, + {1, "False"}, {332, 0}, {322, 0}, {323, 0}, @@ -2051,6 +2057,6 @@ grammar _PyParser_Grammar = { 81, dfas, - {164, labels}, + {167, labels}, 256 }; Modified: python/branches/cpy_merge/Python/import.c ============================================================================== --- python/branches/cpy_merge/Python/import.c (original) +++ python/branches/cpy_merge/Python/import.c Tue Jun 5 01:44:17 2007 @@ -371,7 +371,6 @@ /* List of names to clear in sys */ static char* sys_deletes[] = { "path", "argv", "ps1", "ps2", - "exc_type", "exc_value", "exc_traceback", "last_type", "last_value", "last_traceback", "path_hooks", "path_importer_cache", "meta_path", NULL @@ -2430,7 +2429,7 @@ if (modules_reloading == NULL) { Py_FatalError("PyImport_ReloadModule: " - "no modules_reloading dictionary!"); + "no modules_reloading dictionary!"); return NULL; } @@ -2474,7 +2473,7 @@ "reload(): parent %.200s not in sys.modules", PyString_AS_STRING(parentname)); Py_DECREF(parentname); - imp_modules_reloading_clear(); + imp_modules_reloading_clear(); return NULL; } Py_DECREF(parentname); Modified: python/branches/cpy_merge/Python/sysmodule.c ============================================================================== --- python/branches/cpy_merge/Python/sysmodule.c (original) +++ python/branches/cpy_merge/Python/sysmodule.c Tue Jun 5 01:44:17 2007 @@ -163,33 +163,6 @@ ); static PyObject * -sys_exc_clear(PyObject *self, PyObject *noargs) -{ - PyThreadState *tstate = PyThreadState_GET(); - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = NULL; - tstate->exc_value = NULL; - tstate->exc_traceback = NULL; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); - Py_INCREF(Py_None); - return Py_None; -} - -PyDoc_STRVAR(exc_clear_doc, -"exc_clear() -> None\n\ -\n\ -Clear global information on the current exception. Subsequent calls to\n\ -exc_info() will return (None,None,None) until another exception is raised\n\ -in the current thread or the execution stack returns to a frame where\n\ -another exception is being handled." -); - -static PyObject * sys_exit(PyObject *self, PyObject *args) { PyObject *exit_code = 0; @@ -760,7 +733,6 @@ current_frames_doc}, {"displayhook", sys_displayhook, METH_O, displayhook_doc}, {"exc_info", sys_exc_info, METH_NOARGS, exc_info_doc}, - {"exc_clear", sys_exc_clear, METH_NOARGS, exc_clear_doc}, {"excepthook", sys_excepthook, METH_VARARGS, excepthook_doc}, {"exit", sys_exit, METH_VARARGS, exit_doc}, #ifdef Py_USING_UNICODE @@ -908,12 +880,6 @@ last_traceback -- traceback of last uncaught exception\n\ These three are only available in an interactive session after a\n\ traceback has been printed.\n\ -\n\ -exc_type -- type of exception currently being handled\n\ -exc_value -- value of exception currently being handled\n\ -exc_traceback -- traceback of exception currently being handled\n\ - The function exc_info() should be used instead of these three,\n\ - because it is thread-safe.\n\ " ) /* concatenating string here */ @@ -954,7 +920,6 @@ displayhook() -- print an object to the screen, and save it in __builtin__._\n\ excepthook() -- print an exception and its traceback to sys.stderr\n\ exc_info() -- return thread-safe information about the current exception\n\ -exc_clear() -- clear the exception state for the current thread\n\ exit() -- exit the interpreter by raising SystemExit\n\ getdlopenflags() -- returns flags to be used for dlopen() calls\n\ getrefcount() -- return the reference count for an object (plus one :-)\n\ Modified: python/branches/cpy_merge/README ============================================================================== --- python/branches/cpy_merge/README (original) +++ python/branches/cpy_merge/README Tue Jun 5 01:44:17 2007 @@ -463,10 +463,10 @@ array, audioop, binascii, cPickle, cStringIO, cmath, crypt, curses, errno, fcntl, gdbm, grp, - _locale, math, md5, new, operator, parser, pcre, - posix, pwd, readline, regex, reop, - select, signal, socket, soundex, struct, - syslog, termios, time, timing, zlib, audioop + _locale, math, new, operator, parser, + posix, pwd, readline, regex, + select, signal, socket, struct, + syslog, termios, time, zlib, audioop 3) make SHELL=/usr/local/bin/bash @@ -520,9 +520,8 @@ _codecs, _locale, _socket, _symtable, _testcapi, _weakref array, binascii, cmath, cPickle, crypt, cStringIO, dbm - errno, fcntl, grp, math, md5, operator, parser, pwd - rotor, select, struct, syslog, termios, - time, timing + errno, fcntl, grp, math, operator, parser, pwd + rotor, select, struct, syslog, termios, time 4) Once the python executable and library have been built, make will execute setup.py, which will attempt to build remaining Modified: python/branches/cpy_merge/setup.py ============================================================================== --- python/branches/cpy_merge/setup.py (original) +++ python/branches/cpy_merge/setup.py Tue Jun 5 01:44:17 2007 @@ -489,11 +489,6 @@ else: missing.append('syslog') - # George Neville-Neil's timing module: - # Deprecated in PEP 4 http://www.python.org/peps/pep-0004.html - # http://mail.python.org/pipermail/python-dev/2006-January/060023.html - #exts.append( Extension('timing', ['timingmodule.c']) ) - # # Here ends the simple stuff. From here on, modules need certain # libraries, are platform-specific, or present other surprises. @@ -624,16 +619,7 @@ include_dirs = ssl_incs, library_dirs = ssl_libs, libraries = ['ssl', 'crypto']) ) - missing.extend(['_sha', '_md5']) else: - # The _sha module implements the SHA1 hash algorithm. - exts.append( Extension('_sha', ['shamodule.c']) ) - # The _md5 module implements the RSA Data Security, Inc. MD5 - # Message-Digest Algorithm, described in RFC 1321. The - # necessary files md5.c and md5.h are included here. - exts.append( Extension('_md5', - sources = ['md5module.c', 'md5.c'], - depends = ['md5.h']) ) missing.append('_hashlib') if (openssl_ver < 0x00908000): From python-checkins at python.org Tue Jun 5 04:05:07 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 5 Jun 2007 04:05:07 +0200 (CEST) Subject: [Python-checkins] r55757 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070605020507.570881E4005@bag.python.org> Author: brett.cannon Date: Tue Jun 5 04:05:02 2007 New Revision: 55757 Modified: sandbox/trunk/import_in_py/pseudocode.py Log: Flesh out pseudocode for import machinery. Leaves out details of how importing built-in, frozen, extension, and Python source/bytecode modules work. But where and how import looks for modules is all done. Modified: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- sandbox/trunk/import_in_py/pseudocode.py (original) +++ sandbox/trunk/import_in_py/pseudocode.py Tue Jun 5 04:05:02 2007 @@ -1,24 +1,131 @@ raise ImportError("module is just pseudocode") +import sys + def __import__(name, globals, locals, fromlist, level): """Pseudocode to explain how importing works. Caveats: - + Classic relative import semantics are not currently covered. + + Classic relative import semantics are not covered. + Assume all code runs with the import lock held. """ - if level != 0: # Relative import. - name = resolve_name(name, level) # XXX - # Import each parent in the name, starting at root. - # Skipping over details of constructing each parent name and setting the - # proper attribute on the parent for newly imported modules. - for parent in name: + path = globals.get('__path__') + # If a relative import, figure out absolute name of requested module. + if level != 0: + # Adjust relative import based on whether caller is a package and + # the specified level. + # Make sure import does not go beyond top-level. + name = resolve_name(name, globals['__name__'], path, level) + # Import each parent in the name, starting at the top. + # Assume each_parent iterates through each parent of the module request, + # starting at the top-level parent. + # Since loaders are required to set the module in sys.modules, a successful + # import should be followed by 'continue' to let the next module be + # imported. + for parent in each_parent(name): if parent in sys.modules: continue + # Search sys.meta_path. for meta_importer in sys.meta_path: - check_meta_path(parent, meta_importer) # XXX + loader = meta_importer.find_module(name, path) + if loader: + loader.load_module(name) + continue + # Check built-in and frozen modules. + else: + for module_finder in (builtin_importer, frozen_importer): + loader = module_finder(name, path) + if loader: + loader.load_module(name) + continue + # With sys.meta_path, built-ins, and frozen modules checked, now look + # at sys.path. for path_entry in sys.path: - check_path(parent, path_entry) # XXX - # XXX error: not found - return module_to_return(path, fromlist) # XXX + # Look for a cached importer. + if path_entry in sys.path_importer_cache: + importer = sys.path_importer_cache[path_entry] + # Found an importer. + if importer: + loader = importer.find_module(name) + # If the import can handle the module, load it. Otherwise + # fall through to the default import. + if loader: + loader.load_module(name) + continue + # A pre-existing importer was not found; try to make one. + else: + for importer_factory in sys.path_hooks: + try: + # If an importer is found, cache it and try to use it. + # If it can't be used, then fall through to the default + # import. + importer = importer_factory(path_entry) + sys.path_importer_cache[path_entry] = importer + loader = importer.find_module(name) + if loader: + loader.load_module(name) + except ImportError: + continue + else: + # No importer could be created, so set to None in + # sys.path_import_cache to skip trying to make one in the + # future, then fall through to the default import. + sys.path_importer_cache[path_entry] = None + # As no importer was found for the sys.path entry, use the default + # importer for extension modules, Python bytecode, and Python + # source modules. + loader = find_extension_module(name, path_entry) + if loader: + loader.load_module(name) + continue + loader = find_py_pyc_module(name, path_entry) + if loader: + loader.load_module(name) + continue + # All available places to look for a module have been exhausted; raise + # an ImportError. + raise ImportError + # With the module now imported and store in sys.modules, figure out exactly + # what module to return based on fromlist and how the module name was + # specified. + # If fromlist is empty, return the module top-most parent module based on + # whether the import was relative or not. + if not fromlist: + if level: + return top_relative_name(name, level) + else: + return sys.modules[name.split('.', 1)[0]] + # If fromlist is not empty, return the module as directly specified in the + # import. + # Must also handle possible imports of modules if the module imported was a + # package and thus names in the fromlist are modules within the package and + # not object within a module. + else: + module = sys.modules[name] + # If not a module, then can just return the module as the names + # specified in fromlist are supposed to be attributes on the module. + if not hasattr(module, '__path__'): + return module + # The imported module was a package, which means everything in the + # fromlist are supposed to be modules within the package. That means + # that an *attempt* must be made to try to import every name in + # fromlist. + if '*' in fromlist and hasattr(module, '__all__'): + fromlist = list(fromlist).extend(module.__all__) + for item in fromlist: + if item == '*': + continue + if not hasattr(module, item): + try: + __import__('.'.join([name, item]), module.__dict__, level=0) + except ImportError: + pass + return module + + +def find_extension_module(name, path_entry): + pass + +def find_py_pyc_module(name, path_entry): + pass From python-checkins at python.org Tue Jun 5 04:05:39 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 5 Jun 2007 04:05:39 +0200 (CEST) Subject: [Python-checkins] r55758 - sandbox/trunk/import_in_py/import_diagram.dot sandbox/trunk/import_in_py/import_diagram.svg Message-ID: <20070605020539.B35621E4018@bag.python.org> Author: brett.cannon Date: Tue Jun 5 04:05:38 2007 New Revision: 55758 Removed: sandbox/trunk/import_in_py/import_diagram.dot sandbox/trunk/import_in_py/import_diagram.svg Log: Remove the attempt at diagramming import. Pseudocode is easier to write and read. Deleted: /sandbox/trunk/import_in_py/import_diagram.dot ============================================================================== --- /sandbox/trunk/import_in_py/import_diagram.dot Tue Jun 5 04:05:38 2007 +++ (empty file) @@ -1,72 +0,0 @@ -/* XXX For inputs to a function, can use dashed or dotted lines; that way solid - * lines are just for control flow. */ -digraph Import { - compound=true; - - /* Input. */ - subgraph cluster_input { - label="Input"; - color=blue; - node [shape=ellipse]; - - module_name [width=2]; - globals [width=1.5]; - locals [width=1.5]; - fromlist [width=1.5]; - level [width=1.5]; - } - - /* Output. */ - subgraph cluster_output { - label="Output"; - color=blue; - node [shape=ellipse]; - - return [width=1.5]; - ImportError [width=2]; - } - - /* All work that occurs while the import lock is held. */ - subgraph cluster_import_locking { - label="Import Lock Held"; - color=blue; - - /* Name resolution needed? */ - if_name_resolution [shape=diamond, - label="level != 0 and \n '__name__'", - width=3, height=1.5]; - - /* Name resolution cluster. */ - subgraph cluster_name_resolution { - label="Make name absolute"; - color=blue; - - pkg_level_adjust [shape=box, - label="level - 1 \n if '__path__' \n else level", - width=2, height=1]; - - test_depth [shape=diamond, label="Depth < level", - width=2.5]; - - adjust_name [shape=box, label="Adjust name", width=1.75]; - - pkg_level_adjust -> test_depth; - test_depth -> ImportError [label="True"]; - test_depth -> adjust_name [label="False"]; - } - if_name_resolution -> pkg_level_adjust [label="True"]; - - /* Name is absolute. */ - abs_module_name [shape=point, label="absolute \n module name"]; - - adjust_name -> abs_module_name; - if_name_resolution -> abs_module_name [label="False"]; - - abs_module_name -> return; - } - - /* XXX until I decide how I want to handle the inputs. */ - start [shape=point]; - {module_name; globals; locals; fromlist; level} -> start; - start-> if_name_resolution; -} Deleted: /sandbox/trunk/import_in_py/import_diagram.svg ============================================================================== --- /sandbox/trunk/import_in_py/import_diagram.svg Tue Jun 5 04:05:38 2007 +++ (empty file) @@ -1,137 +0,0 @@ - - - - - -Import -cluster_input - -Input - -cluster_output - -Output - -cluster_import_locking - -Import Lock Held - -cluster_name_resolution - -Make name absolute - -module_name - -module_name - -start - - -module_name->start - - - -globals - -globals - -globals->start - - - -locals - -locals - -locals->start - - - -fromlist - -fromlist - -fromlist->start - - - -level - -level - -level->start - - - -return - -return - -ImportError - -ImportError - -if_name_resolution - -level != 0 and - '__name__' - -pkg_level_adjust - -level - 1 - if '__path__' - else level - -if_name_resolution->pkg_level_adjust - - -True - -abs_module_name - - -if_name_resolution->abs_module_name - - -False - -test_depth - -Depth < level - -pkg_level_adjust->test_depth - - - -test_depth->ImportError - - -True - -adjust_name - -Adjust name - -test_depth->adjust_name - - -False - -adjust_name->abs_module_name - - - -abs_module_name->return - - - -start->if_name_resolution - - - - - From python-checkins at python.org Tue Jun 5 20:13:42 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 5 Jun 2007 20:13:42 +0200 (CEST) Subject: [Python-checkins] r55765 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070605181342.07C801E4005@bag.python.org> Author: alexandre.vassalotti Date: Tue Jun 5 20:13:37 2007 New Revision: 55765 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Fix the name of some variables to be more explicit. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Tue Jun 5 20:13:37 2007 @@ -153,7 +153,7 @@ return NULL; /* adjust invalid sizes */ - l = self->string_size - self->pos; + len = self->string_size - self->pos; if (n < 0 || n > len) { n = len; if (n < 0) Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Tue Jun 5 20:13:37 2007 @@ -28,7 +28,7 @@ { Py_UNICODE *n; const Py_UNICODE *str_end; - Py_ssize_t l; + Py_ssize_t len; /* XXX: Should we ckeck here if the object is closed, for thread-safety? */ @@ -43,26 +43,26 @@ n++; /* Get the length from the current position to the end of the line. */ - l = n - (self->buf + self->pos); + len = n - (self->buf + self->pos); *output = self->buf + self->pos; - assert(self->pos + l < PY_SSIZE_T_MAX); + assert(self->pos + len < PY_SSIZE_T_MAX); assert(l >= 0); - self->pos += l; + self->pos += len; - return l; + return len; } /* Internal routine for writing a string of bytes to the buffer of a StringIO object. Returns the number of bytes wrote. */ static Py_ssize_t -write_str(StringIOObject *self, const Py_UNICODE *ustr, Py_ssize_t l) +write_str(StringIOObject *self, const Py_UNICODE *ustr, Py_ssize_t len) { Py_ssize_t newl; assert(self->buf != NULL); - newl = self->pos + l; + newl = self->pos + len; if (newl >= self->buf_size) { self->buf_size *= 2; if (self->buf_size <= newl) { @@ -79,16 +79,16 @@ } } - memcpy(self->buf + self->pos, ustr, l * sizeof(Py_UNICODE)); + memcpy(self->buf + self->pos, ustr, len * sizeof(Py_UNICODE)); - assert(self->pos + l < PY_SSIZE_T_MAX); - self->pos += l; + assert(self->pos + len < PY_SSIZE_T_MAX); + self->pos += len; if (self->string_size < self->pos) { self->string_size = self->pos; } - return l; + return len; } @@ -143,7 +143,7 @@ static PyObject * string_io_read(StringIOObject *self, PyObject *args) { - Py_ssize_t l, n = -1; + Py_ssize_t len, n = -1; Py_UNICODE *output; if (self->buf == NULL) @@ -153,9 +153,9 @@ return NULL; /* adjust invalid sizes */ - l = self->string_size - self->pos; - if (n < 0 || n > l) { - n = l; + len = self->string_size - self->pos; + if (n < 0 || n > len) { + n = len; if (n < 0) n = 0; } @@ -169,21 +169,21 @@ static PyObject * string_io_readline(StringIOObject *self, PyObject *args) { - Py_ssize_t n, m = -1; + Py_ssize_t n, size = -1; Py_UNICODE *output; if (self->buf == NULL) return err_closed(); - if (!PyArg_ParseTuple(args, "|i:readline", &m)) + if (!PyArg_ParseTuple(args, "|i:readline", &size)) return NULL; n = get_line(self, &output); - if (m >= 0 && m < n) { - m = n - m; - n -= m; - self->pos -= m; + if (size >= 0 && size < n) { + size = n - size; + n -= size; + self->pos -= size; } return PyUnicode_FromUnicode(output, n); @@ -192,14 +192,14 @@ static PyObject * string_io_readlines(StringIOObject *self, PyObject *args) { - Py_ssize_t n, hint = 0, length = 0; + Py_ssize_t n, size = 0, len = 0; PyObject *result, *line; Py_UNICODE *output; if (self->buf == NULL) return err_closed(); - if (!PyArg_ParseTuple(args, "|i:readlines", &hint)) + if (!PyArg_ParseTuple(args, "|i:readlines", &size)) return NULL; result = PyList_New(0); @@ -219,8 +219,8 @@ goto err; } Py_DECREF(line); - length += n; - if (hint > 0 && length >= hint) + len += n; + if (size > 0 && len >= size) break; } return result; From python-checkins at python.org Tue Jun 5 20:16:53 2007 From: python-checkins at python.org (hyeshik.chang) Date: Tue, 5 Jun 2007 20:16:53 +0200 (CEST) Subject: [Python-checkins] r55766 - python/trunk/Modules/socketmodule.c Message-ID: <20070605181653.2FCA81E4005@bag.python.org> Author: hyeshik.chang Date: Tue Jun 5 20:16:52 2007 New Revision: 55766 Modified: python/trunk/Modules/socketmodule.c Log: Fix build on FreeBSD. Bluetooth HCI API in FreeBSD is quite different from Linux's. Just fix the build for now but the code doesn't support the complete capability of HCI on FreeBSD yet. Modified: python/trunk/Modules/socketmodule.c ============================================================================== --- python/trunk/Modules/socketmodule.c (original) +++ python/trunk/Modules/socketmodule.c Tue Jun 5 20:16:52 2007 @@ -363,8 +363,11 @@ #define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP #define BTPROTO_RFCOMM BLUETOOTH_PROTO_RFCOMM #define BTPROTO_HCI BLUETOOTH_PROTO_HCI +#define SOL_HCI SOL_HCI_RAW +#define HCI_FILTER SO_HCI_RAW_FILTER #define sockaddr_l2 sockaddr_l2cap #define sockaddr_rc sockaddr_rfcomm +#define hci_dev hci_node #define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb) #define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb) #define _BT_HCI_MEMB(sa, memb) ((sa)->hci_##memb) @@ -4467,10 +4470,10 @@ PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP); PyModule_AddIntConstant(m, "BTPROTO_HCI", BTPROTO_HCI); PyModule_AddIntConstant(m, "SOL_HCI", SOL_HCI); - PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP); - PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR); PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER); #if !defined(__FreeBSD__) + PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP); + PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR); PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO); #endif PyModule_AddIntConstant(m, "BTPROTO_RFCOMM", BTPROTO_RFCOMM); From python-checkins at python.org Tue Jun 5 20:21:43 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 5 Jun 2007 20:21:43 +0200 (CEST) Subject: [Python-checkins] r55767 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070605182143.86C3C1E4005@bag.python.org> Author: alexandre.vassalotti Date: Tue Jun 5 20:21:38 2007 New Revision: 55767 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Converted tabs to spaces. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Tue Jun 5 20:21:38 2007 @@ -4,10 +4,10 @@ "A fast implementation of BytesIO."); typedef struct { - PyObject_HEAD - char *buf; - Py_ssize_t pos, string_size; - Py_ssize_t buf_size; + PyObject_HEAD + char *buf; + Py_ssize_t pos, string_size; + Py_ssize_t buf_size; } BytesIOObject; static PyTypeObject BytesIO_Type; @@ -18,39 +18,39 @@ static PyObject * err_closed(void) { - PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); - return NULL; + PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); + return NULL; } /* Internal routine to get a line. Returns the number of bytes read. */ static Py_ssize_t get_line(BytesIOObject *self, char **output) { - char *n; - const char *str_end; - Py_ssize_t len; - - /* XXX: Should we ckeck here if the object is closed, - for thread-safety? */ - assert(self->buf != NULL); - str_end = self->buf + self->string_size; - - /* Move to the end of the line, up to the end of the string, s. */ - for (n = self->buf + self->pos; n < str_end && *n != '\n'; n++); - - /* Skip the newline character */ - if (n < str_end) - n++; - - /* Get the length from the current position to the end of the line. */ - len = n - (self->buf + self->pos); - *output = self->buf + self->pos; - - assert(self->pos + len < PY_SSIZE_T_MAX); - assert(len >= 0); - self->pos += len; + char *n; + const char *str_end; + Py_ssize_t len; + + /* XXX: Should we ckeck here if the object is closed, + for thread-safety? */ + assert(self->buf != NULL); + str_end = self->buf + self->string_size; + + /* Move to the end of the line, up to the end of the string, s. */ + for (n = self->buf + self->pos; n < str_end && *n != '\n'; n++); + + /* Skip the newline character */ + if (n < str_end) + n++; + + /* Get the length from the current position to the end of the line. */ + len = n - (self->buf + self->pos); + *output = self->buf + self->pos; + + assert(self->pos + len < PY_SSIZE_T_MAX); + assert(len >= 0); + self->pos += len; - return len; + return len; } /* Internal routine for writing a string of bytes to the buffer of a BytesIO @@ -58,376 +58,376 @@ static Py_ssize_t write_bytes(BytesIOObject *self, const char *bytes, Py_ssize_t len) { - Py_ssize_t new_len; + Py_ssize_t new_len; - assert(self->buf != NULL); + assert(self->buf != NULL); - new_len = self->pos + len; - if (new_len >= self->buf_size) { - self->buf_size *= 2; - if (self->buf_size <= new_len) { - assert(new_len + 1 < PY_SSIZE_T_MAX); - self->buf_size = new_len + 1; - } - - PyMem_Resize(self->buf, char, self->buf_size); - if (self->buf == NULL) { - PyErr_SetString(PyExc_MemoryError, "Out of memory"); - PyMem_Del(self->buf); - self->buf_size = self->pos = 0; - return -1; - } - } - - memcpy(self->buf + self->pos, bytes, len); - - assert(self->pos + len < PY_SSIZE_T_MAX); - self->pos += len; - - if (self->string_size < self->pos) { - self->string_size = self->pos; - } + new_len = self->pos + len; + if (new_len >= self->buf_size) { + self->buf_size *= 2; + if (self->buf_size <= new_len) { + assert(new_len + 1 < PY_SSIZE_T_MAX); + self->buf_size = new_len + 1; + } + + PyMem_Resize(self->buf, char, self->buf_size); + if (self->buf == NULL) { + PyErr_SetString(PyExc_MemoryError, "Out of memory"); + PyMem_Del(self->buf); + self->buf_size = self->pos = 0; + return -1; + } + } + + memcpy(self->buf + self->pos, bytes, len); + + assert(self->pos + len < PY_SSIZE_T_MAX); + self->pos += len; + + if (self->string_size < self->pos) { + self->string_size = self->pos; + } - return len; + return len; } static PyObject * bytes_io_get_closed(BytesIOObject *self) { - PyObject *result = Py_False; + PyObject *result = Py_False; - if (self->buf == NULL) - result = Py_True; + if (self->buf == NULL) + result = Py_True; - Py_INCREF(result); - return result; + Py_INCREF(result); + return result; } static PyObject * bytes_io_flush(BytesIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * bytes_io_getvalue(BytesIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - return PyString_FromStringAndSize(self->buf, self->string_size); + return PyString_FromStringAndSize(self->buf, self->string_size); } static PyObject * bytes_io_isatty(BytesIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - Py_RETURN_FALSE; + Py_RETURN_FALSE; } static PyObject * bytes_io_tell(BytesIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - return PyInt_FromSsize_t(self->pos); + return PyInt_FromSsize_t(self->pos); } static PyObject * bytes_io_read(BytesIOObject *self, PyObject *args) { - Py_ssize_t len, n = -1; - char *output; + Py_ssize_t len, n = -1; + char *output; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "|n:read", &n)) - return NULL; + if (!PyArg_ParseTuple(args, "|n:read", &n)) + return NULL; - /* adjust invalid sizes */ - len = self->string_size - self->pos; - if (n < 0 || n > len) { - n = len; - if (n < 0) - n = 0; - } + /* adjust invalid sizes */ + len = self->string_size - self->pos; + if (n < 0 || n > len) { + n = len; + if (n < 0) + n = 0; + } - output = self->buf + self->pos; - self->pos += n; + output = self->buf + self->pos; + self->pos += n; - return PyString_FromStringAndSize(output, n); + return PyString_FromStringAndSize(output, n); } static PyObject * bytes_io_readline(BytesIOObject *self, PyObject *args) { - Py_ssize_t n, size = -1; - char *output; + Py_ssize_t n, size = -1; + char *output; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "|i:readline", &size)) - return NULL; + if (!PyArg_ParseTuple(args, "|i:readline", &size)) + return NULL; - n = get_line(self, &output); + n = get_line(self, &output); - if (size >= 0 && size < n) { - size = n - size; - n -= size; - self->pos -= size; - } + if (size >= 0 && size < n) { + size = n - size; + n -= size; + self->pos -= size; + } - return PyString_FromStringAndSize(output, n); + return PyString_FromStringAndSize(output, n); } static PyObject * bytes_io_readlines(BytesIOObject *self, PyObject *args) { - Py_ssize_t n, size = 0, len = 0; - PyObject *result, *line; - char *output; - - if (self->buf == NULL) - return err_closed(); - - if (!PyArg_ParseTuple(args, "|i:readlines", &size)) - return NULL; - - result = PyList_New(0); - if (!result) - return NULL; - - while (1) { - n = get_line(self, &output); - - if (n == 0) - break; - line = PyString_FromStringAndSize(output, n); - if (!line) - goto err; - if (PyList_Append(result, line) == -1) { - Py_DECREF(line); - goto err; - } - Py_DECREF(line); - len += n; - if (size > 0 && len >= size) - break; - } - return result; + Py_ssize_t n, size = 0, len = 0; + PyObject *result, *line; + char *output; + + if (self->buf == NULL) + return err_closed(); + + if (!PyArg_ParseTuple(args, "|i:readlines", &size)) + return NULL; + + result = PyList_New(0); + if (!result) + return NULL; + + while (1) { + n = get_line(self, &output); + + if (n == 0) + break; + line = PyString_FromStringAndSize(output, n); + if (!line) + goto err; + if (PyList_Append(result, line) == -1) { + Py_DECREF(line); + goto err; + } + Py_DECREF(line); + len += n; + if (size > 0 && len >= size) + break; + } + return result; err: - Py_DECREF(result); - return NULL; + Py_DECREF(result); + return NULL; } static PyObject * bytes_io_truncate(BytesIOObject *self, PyObject *args) { - Py_ssize_t size; + Py_ssize_t size; - /* Truncate to current position if no argument is passed. */ - size = self->pos; + /* Truncate to current position if no argument is passed. */ + size = self->pos; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "|n:truncate", &size)) - return NULL; + if (!PyArg_ParseTuple(args, "|n:truncate", &size)) + return NULL; - if (size < 0) { - errno = EINVAL; - PyErr_SetFromErrno(PyExc_IOError); - return NULL; - } + if (size < 0) { + errno = EINVAL; + PyErr_SetFromErrno(PyExc_IOError); + return NULL; + } - if (self->string_size > size) - self->string_size = size; - self->pos = self->string_size; + if (self->string_size > size) + self->string_size = size; + self->pos = self->string_size; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * bytes_io_iternext(BytesIOObject *self) { - char *next; - Py_ssize_t n; + char *next; + Py_ssize_t n; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - n = get_line(self, &next); + n = get_line(self, &next); - if (!next) - return NULL; - if (n == 0) - return NULL; + if (!next) + return NULL; + if (n == 0) + return NULL; - return PyString_FromStringAndSize(next, n); + return PyString_FromStringAndSize(next, n); } static PyObject * bytes_io_seek(BytesIOObject *self, PyObject *args) { - Py_ssize_t position; - int mode = 0; + Py_ssize_t position; + int mode = 0; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "n|i:seek", &position, &mode)) - return NULL; + if (!PyArg_ParseTuple(args, "n|i:seek", &position, &mode)) + return NULL; - if (mode == 2) { - position += self->string_size; - } - else if (mode == 1) { - position += self->pos; - } - - if (position > self->buf_size) { - self->buf_size *= 2; - if (self->buf_size <= position) - self->buf_size = position + 1; - - PyMem_Resize(self->buf, char, self->buf_size); - if (self->buf == NULL) { - PyMem_Del(self->buf); - self->buf_size = self->pos = 0; - return PyErr_NoMemory(); - } - } - else if (position < 0) - position = 0; + if (mode == 2) { + position += self->string_size; + } + else if (mode == 1) { + position += self->pos; + } + + if (position > self->buf_size) { + self->buf_size *= 2; + if (self->buf_size <= position) + self->buf_size = position + 1; + + PyMem_Resize(self->buf, char, self->buf_size); + if (self->buf == NULL) { + PyMem_Del(self->buf); + self->buf_size = self->pos = 0; + return PyErr_NoMemory(); + } + } + else if (position < 0) + position = 0; - self->pos = position; + self->pos = position; - while (--position >= self->string_size) - self->buf[position] = 0; + while (--position >= self->string_size) + self->buf[position] = 0; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * bytes_io_write(BytesIOObject *self, PyObject *args) { - const char *bytes; - Py_ssize_t n; + const char *bytes; + Py_ssize_t n; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "t#:write", &bytes, &n)) - return NULL; + if (!PyArg_ParseTuple(args, "t#:write", &bytes, &n)) + return NULL; - if (write_bytes(self, bytes, n) == -1) - return NULL; + if (write_bytes(self, bytes, n) == -1) + return NULL; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * bytes_io_writelines(BytesIOObject *self, PyObject *v) { - PyObject *it, *item; + PyObject *it, *item; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - it = PyObject_GetIter(v); - if (it == NULL) - return NULL; - - while ((item = PyIter_Next(it)) != NULL) { - Py_ssize_t n; - char *c; - if (PyString_AsStringAndSize(item, &c, &n) == -1) { - Py_DECREF(it); - Py_DECREF(item); - return NULL; - } - Py_DECREF(item); - - if (write_bytes(self, c, n) == -1) { - Py_DECREF(it); - return NULL; - } - } - Py_DECREF(it); - - /* See if PyIter_Next failed */ - if (PyErr_Occurred()) - return NULL; + it = PyObject_GetIter(v); + if (it == NULL) + return NULL; + + while ((item = PyIter_Next(it)) != NULL) { + Py_ssize_t n; + char *c; + if (PyString_AsStringAndSize(item, &c, &n) == -1) { + Py_DECREF(it); + Py_DECREF(item); + return NULL; + } + Py_DECREF(item); + + if (write_bytes(self, c, n) == -1) { + Py_DECREF(it); + return NULL; + } + } + Py_DECREF(it); + + /* See if PyIter_Next failed */ + if (PyErr_Occurred()) + return NULL; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * bytes_io_close(BytesIOObject *self) { - if (self->buf != NULL) - PyMem_Del(self->buf); - self->buf = NULL; + if (self->buf != NULL) + PyMem_Del(self->buf); + self->buf = NULL; - self->pos = self->string_size = self->buf_size = 0; + self->pos = self->string_size = self->buf_size = 0; - Py_RETURN_NONE; + Py_RETURN_NONE; } static void BytesIO_dealloc(BytesIOObject *op) { - if (op->buf != NULL) - PyMem_Del(op->buf); + if (op->buf != NULL) + PyMem_Del(op->buf); - op->ob_type->tp_free((PyObject *)op); + op->ob_type->tp_free((PyObject *)op); } static PyObject * BytesIO_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - BytesIOObject *self; - const char *buf; - Py_ssize_t n = -1, size = BUFSIZE; - - assert(type != NULL && type->tp_alloc != NULL); - - if (!PyArg_ParseTuple(args, "|t#:BytesIO", &buf, &n)) - return NULL; - - self = (BytesIOObject *)type->tp_alloc(type, 0); - - if (self == NULL) - return NULL; - - self->buf = PyMem_New(char, size); - - /* These variables need to be initialized before attempting to write - anything to the object. */ - self->pos = 0; - self->string_size = 0; - - if (n > 0) { - if (write_bytes(self, buf, n) == -1) - return NULL; - self->pos = 0; - } - if (self->buf == NULL) { - Py_DECREF(self); - return PyErr_NoMemory(); - } - self->buf_size = size; + BytesIOObject *self; + const char *buf; + Py_ssize_t n = -1, size = BUFSIZE; + + assert(type != NULL && type->tp_alloc != NULL); + + if (!PyArg_ParseTuple(args, "|t#:BytesIO", &buf, &n)) + return NULL; + + self = (BytesIOObject *)type->tp_alloc(type, 0); + + if (self == NULL) + return NULL; + + self->buf = PyMem_New(char, size); + + /* These variables need to be initialized before attempting to write + anything to the object. */ + self->pos = 0; + self->string_size = 0; + + if (n > 0) { + if (write_bytes(self, buf, n) == -1) + return NULL; + self->pos = 0; + } + if (self->buf == NULL) { + Py_DECREF(self); + return PyErr_NoMemory(); + } + self->buf_size = size; - return (PyObject *)self; + return (PyObject *)self; } @@ -501,95 +501,95 @@ static PyGetSetDef BytesIO_getsetlist[] = { - {"closed", (getter) bytes_io_get_closed, NULL, - "True if the file is closed"}, - {0}, /* sentinel */ + {"closed", (getter) bytes_io_get_closed, NULL, + "True if the file is closed"}, + {0}, /* sentinel */ }; static struct PyMethodDef BytesIO_methods[] = { - {"flush", (PyCFunction) bytes_io_flush, METH_NOARGS, - BytesIO_flush_doc}, - {"getvalue", (PyCFunction) bytes_io_getvalue, METH_VARARGS, - BytesIO_getval_doc}, - {"isatty", (PyCFunction) bytes_io_isatty, METH_NOARGS, - BytesIO_isatty_doc}, - {"read", (PyCFunction) bytes_io_read, METH_VARARGS, - BytesIO_read_doc}, - {"readline", (PyCFunction) bytes_io_readline, METH_VARARGS, - BytesIO_readline_doc}, - {"readlines", (PyCFunction) bytes_io_readlines, METH_VARARGS, - BytesIO_readlines_doc}, - {"tell", (PyCFunction) bytes_io_tell, METH_NOARGS, - BytesIO_tell_doc}, - {"truncate", (PyCFunction) bytes_io_truncate, METH_VARARGS, - BytesIO_truncate_doc}, - {"close", (PyCFunction) bytes_io_close, METH_NOARGS, - BytesIO_close_doc}, - {"seek", (PyCFunction) bytes_io_seek, METH_VARARGS, - BytesIO_seek_doc}, - {"write", (PyCFunction) bytes_io_write, METH_VARARGS, - BytesIO_write_doc}, - {"writelines", (PyCFunction) bytes_io_writelines, METH_O, - BytesIO_writelines_doc}, - {NULL, NULL} /* sentinel */ + {"flush", (PyCFunction) bytes_io_flush, METH_NOARGS, + BytesIO_flush_doc}, + {"getvalue", (PyCFunction) bytes_io_getvalue, METH_VARARGS, + BytesIO_getval_doc}, + {"isatty", (PyCFunction) bytes_io_isatty, METH_NOARGS, + BytesIO_isatty_doc}, + {"read", (PyCFunction) bytes_io_read, METH_VARARGS, + BytesIO_read_doc}, + {"readline", (PyCFunction) bytes_io_readline, METH_VARARGS, + BytesIO_readline_doc}, + {"readlines", (PyCFunction) bytes_io_readlines, METH_VARARGS, + BytesIO_readlines_doc}, + {"tell", (PyCFunction) bytes_io_tell, METH_NOARGS, + BytesIO_tell_doc}, + {"truncate", (PyCFunction) bytes_io_truncate, METH_VARARGS, + BytesIO_truncate_doc}, + {"close", (PyCFunction) bytes_io_close, METH_NOARGS, + BytesIO_close_doc}, + {"seek", (PyCFunction) bytes_io_seek, METH_VARARGS, + BytesIO_seek_doc}, + {"write", (PyCFunction) bytes_io_write, METH_VARARGS, + BytesIO_write_doc}, + {"writelines", (PyCFunction) bytes_io_writelines, METH_O, + BytesIO_writelines_doc}, + {NULL, NULL} /* sentinel */ }; static PyTypeObject BytesIO_Type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ - "_bytes_io.BytesIO", /*tp_name*/ - sizeof(BytesIOObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)BytesIO_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - BytesIO_doc, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - PyObject_SelfIter, /*tp_iter*/ - (iternextfunc)bytes_io_iternext, /*tp_iternext*/ - BytesIO_methods, /*tp_methods*/ - 0, /*tp_members*/ - BytesIO_getsetlist, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - BytesIO_new, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ + PyObject_HEAD_INIT(NULL) + 0, /*ob_size*/ + "_bytes_io.BytesIO", /*tp_name*/ + sizeof(BytesIOObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)BytesIO_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + BytesIO_doc, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + PyObject_SelfIter, /*tp_iter*/ + (iternextfunc)bytes_io_iternext, /*tp_iternext*/ + BytesIO_methods, /*tp_methods*/ + 0, /*tp_members*/ + BytesIO_getsetlist, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + BytesIO_new, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ }; PyMODINIT_FUNC init_bytes_io(void) { - PyObject *m; + PyObject *m; - if (PyType_Ready(&BytesIO_Type) < 0) - return; - m = Py_InitModule3("_bytes_io", NULL, module_doc); - if (m == NULL) - return; - Py_INCREF(&BytesIO_Type); - PyModule_AddObject(m, "BytesIO", (PyObject *)&BytesIO_Type); + if (PyType_Ready(&BytesIO_Type) < 0) + return; + m = Py_InitModule3("_bytes_io", NULL, module_doc); + if (m == NULL) + return; + Py_INCREF(&BytesIO_Type); + PyModule_AddObject(m, "BytesIO", (PyObject *)&BytesIO_Type); } Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Tue Jun 5 20:21:38 2007 @@ -4,10 +4,10 @@ "A fast implementation of StringIO."); typedef struct { - PyObject_HEAD - Py_UNICODE *buf; - Py_ssize_t pos, string_size; - Py_ssize_t buf_size; + PyObject_HEAD + Py_UNICODE *buf; + Py_ssize_t pos, string_size; + Py_ssize_t buf_size; } StringIOObject; static PyTypeObject StringIO_Type; @@ -18,39 +18,39 @@ static PyObject * err_closed(void) { - PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); - return NULL; + PyErr_SetString(PyExc_ValueError, "I/O operation on closed file"); + return NULL; } /* Internal routine to get a line. Returns the number of bytes read. */ static Py_ssize_t get_line(StringIOObject *self, Py_UNICODE **output) { - Py_UNICODE *n; - const Py_UNICODE *str_end; - Py_ssize_t len; - - /* XXX: Should we ckeck here if the object is closed, - for thread-safety? */ - assert(self->buf != NULL); - str_end = self->buf + self->string_size; - - /* Move to the end of the line, up to the end of the string, s. */ - for (n = self->buf + self->pos; n < str_end && *n != '\n'; n++); - - /* Skip the newline character */ - if (n < str_end) - n++; - - /* Get the length from the current position to the end of the line. */ - len = n - (self->buf + self->pos); - *output = self->buf + self->pos; - - assert(self->pos + len < PY_SSIZE_T_MAX); - assert(l >= 0); - self->pos += len; + Py_UNICODE *n; + const Py_UNICODE *str_end; + Py_ssize_t len; + + /* XXX: Should we ckeck here if the object is closed, + for thread-safety? */ + assert(self->buf != NULL); + str_end = self->buf + self->string_size; + + /* Move to the end of the line, up to the end of the string, s. */ + for (n = self->buf + self->pos; n < str_end && *n != '\n'; n++); + + /* Skip the newline character */ + if (n < str_end) + n++; + + /* Get the length from the current position to the end of the line. */ + len = n - (self->buf + self->pos); + *output = self->buf + self->pos; + + assert(self->pos + len < PY_SSIZE_T_MAX); + assert(l >= 0); + self->pos += len; - return len; + return len; } /* Internal routine for writing a string of bytes to the buffer of a StringIO @@ -58,383 +58,383 @@ static Py_ssize_t write_str(StringIOObject *self, const Py_UNICODE *ustr, Py_ssize_t len) { - Py_ssize_t newl; + Py_ssize_t newl; - assert(self->buf != NULL); + assert(self->buf != NULL); - newl = self->pos + len; - if (newl >= self->buf_size) { - self->buf_size *= 2; - if (self->buf_size <= newl) { - assert(newl + 1 < PY_SSIZE_T_MAX); - self->buf_size = newl + 1; - } - - PyMem_Resize(self->buf, Py_UNICODE, self->buf_size); - if (self->buf == NULL) { - PyErr_SetString(PyExc_MemoryError, "Out of memory"); - PyMem_Del(self->buf); - self->buf_size = self->pos = 0; - return -1; - } - } - - memcpy(self->buf + self->pos, ustr, len * sizeof(Py_UNICODE)); - - assert(self->pos + len < PY_SSIZE_T_MAX); - self->pos += len; - - if (self->string_size < self->pos) { - self->string_size = self->pos; - } + newl = self->pos + len; + if (newl >= self->buf_size) { + self->buf_size *= 2; + if (self->buf_size <= newl) { + assert(newl + 1 < PY_SSIZE_T_MAX); + self->buf_size = newl + 1; + } + + PyMem_Resize(self->buf, Py_UNICODE, self->buf_size); + if (self->buf == NULL) { + PyErr_SetString(PyExc_MemoryError, "Out of memory"); + PyMem_Del(self->buf); + self->buf_size = self->pos = 0; + return -1; + } + } + + memcpy(self->buf + self->pos, ustr, len * sizeof(Py_UNICODE)); + + assert(self->pos + len < PY_SSIZE_T_MAX); + self->pos += len; + + if (self->string_size < self->pos) { + self->string_size = self->pos; + } - return len; + return len; } static PyObject * string_io_get_closed(StringIOObject *self) { - PyObject *result = Py_False; + PyObject *result = Py_False; - if (self->buf == NULL) - result = Py_True; + if (self->buf == NULL) + result = Py_True; - Py_INCREF(result); - return result; + Py_INCREF(result); + return result; } static PyObject * string_io_flush(StringIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * string_io_getvalue(StringIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - return PyUnicode_FromUnicode(self->buf, self->string_size); + return PyUnicode_FromUnicode(self->buf, self->string_size); } static PyObject * string_io_isatty(StringIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - Py_RETURN_FALSE; + Py_RETURN_FALSE; } static PyObject * string_io_tell(StringIOObject *self) { - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - return PyInt_FromSsize_t(self->pos); + return PyInt_FromSsize_t(self->pos); } static PyObject * string_io_read(StringIOObject *self, PyObject *args) { - Py_ssize_t len, n = -1; - Py_UNICODE *output; + Py_ssize_t len, n = -1; + Py_UNICODE *output; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "|n:read", &n)) - return NULL; + if (!PyArg_ParseTuple(args, "|n:read", &n)) + return NULL; - /* adjust invalid sizes */ - len = self->string_size - self->pos; - if (n < 0 || n > len) { - n = len; - if (n < 0) - n = 0; - } + /* adjust invalid sizes */ + len = self->string_size - self->pos; + if (n < 0 || n > len) { + n = len; + if (n < 0) + n = 0; + } - output = self->buf + self->pos; - self->pos += n; + output = self->buf + self->pos; + self->pos += n; - return PyUnicode_FromUnicode(output, n); + return PyUnicode_FromUnicode(output, n); } static PyObject * string_io_readline(StringIOObject *self, PyObject *args) { - Py_ssize_t n, size = -1; - Py_UNICODE *output; + Py_ssize_t n, size = -1; + Py_UNICODE *output; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "|i:readline", &size)) - return NULL; + if (!PyArg_ParseTuple(args, "|i:readline", &size)) + return NULL; - n = get_line(self, &output); + n = get_line(self, &output); - if (size >= 0 && size < n) { - size = n - size; - n -= size; - self->pos -= size; - } + if (size >= 0 && size < n) { + size = n - size; + n -= size; + self->pos -= size; + } - return PyUnicode_FromUnicode(output, n); + return PyUnicode_FromUnicode(output, n); } static PyObject * string_io_readlines(StringIOObject *self, PyObject *args) { - Py_ssize_t n, size = 0, len = 0; - PyObject *result, *line; - Py_UNICODE *output; - - if (self->buf == NULL) - return err_closed(); - - if (!PyArg_ParseTuple(args, "|i:readlines", &size)) - return NULL; - - result = PyList_New(0); - if (!result) - return NULL; - - while (1) { - n = get_line(self, &output); - - if (n == 0) - break; - line = PyUnicode_FromUnicode(output, n); - if (!line) - goto err; - if (PyList_Append(result, line) == -1) { - Py_DECREF(line); - goto err; - } - Py_DECREF(line); - len += n; - if (size > 0 && len >= size) - break; - } - return result; + Py_ssize_t n, size = 0, len = 0; + PyObject *result, *line; + Py_UNICODE *output; + + if (self->buf == NULL) + return err_closed(); + + if (!PyArg_ParseTuple(args, "|i:readlines", &size)) + return NULL; + + result = PyList_New(0); + if (!result) + return NULL; + + while (1) { + n = get_line(self, &output); + + if (n == 0) + break; + line = PyUnicode_FromUnicode(output, n); + if (!line) + goto err; + if (PyList_Append(result, line) == -1) { + Py_DECREF(line); + goto err; + } + Py_DECREF(line); + len += n; + if (size > 0 && len >= size) + break; + } + return result; err: - Py_DECREF(result); - return NULL; + Py_DECREF(result); + return NULL; } static PyObject * string_io_truncate(StringIOObject *self, PyObject *args) { - Py_ssize_t size; + Py_ssize_t size; - /* Truncate to current position if no argument is passed. */ - size = self->pos; + /* Truncate to current position if no argument is passed. */ + size = self->pos; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "|n:truncate", &size)) - return NULL; + if (!PyArg_ParseTuple(args, "|n:truncate", &size)) + return NULL; - if (size < 0) { - errno = EINVAL; - PyErr_SetFromErrno(PyExc_IOError); - return NULL; - } + if (size < 0) { + errno = EINVAL; + PyErr_SetFromErrno(PyExc_IOError); + return NULL; + } - if (self->string_size > size) - self->string_size = size; - self->pos = self->string_size; + if (self->string_size > size) + self->string_size = size; + self->pos = self->string_size; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * string_io_iternext(StringIOObject *self) { - Py_UNICODE *next; - Py_ssize_t n; + Py_UNICODE *next; + Py_ssize_t n; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - n = get_line(self, &next); + n = get_line(self, &next); - if (!next) - return NULL; - if (n == 0) - return NULL; + if (!next) + return NULL; + if (n == 0) + return NULL; - return PyUnicode_FromUnicode(next, n); + return PyUnicode_FromUnicode(next, n); } static PyObject * string_io_seek(StringIOObject *self, PyObject *args) { - Py_ssize_t position; - int mode = 0; + Py_ssize_t position; + int mode = 0; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, "n|i:seek", &position, &mode)) - return NULL; + if (!PyArg_ParseTuple(args, "n|i:seek", &position, &mode)) + return NULL; - if (mode == 2) { - position += self->string_size; - } - else if (mode == 1) { - position += self->pos; - } - - if (position > self->buf_size) { - self->buf_size *= 2; - if (self->buf_size <= position) - self->buf_size = position + 1; - - PyMem_Resize(self->buf, Py_UNICODE, self->buf_size); - if (self->buf == NULL) { - PyMem_Del(self->buf); - self->buf_size = self->pos = 0; - return PyErr_NoMemory(); - } - } - else if (position < 0) - position = 0; + if (mode == 2) { + position += self->string_size; + } + else if (mode == 1) { + position += self->pos; + } + + if (position > self->buf_size) { + self->buf_size *= 2; + if (self->buf_size <= position) + self->buf_size = position + 1; + + PyMem_Resize(self->buf, Py_UNICODE, self->buf_size); + if (self->buf == NULL) { + PyMem_Del(self->buf); + self->buf_size = self->pos = 0; + return PyErr_NoMemory(); + } + } + else if (position < 0) + position = 0; - self->pos = position; + self->pos = position; - while (--position >= self->string_size) - self->buf[position] = 0; + while (--position >= self->string_size) + self->buf[position] = 0; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * string_io_write(StringIOObject *self, PyObject *args) { - const Py_UNICODE *ustr; - Py_ssize_t n; + const Py_UNICODE *ustr; + Py_ssize_t n; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - if (!PyArg_ParseTuple(args, - "u#;write() may only be called on" - " unicode strings", &ustr, &n)) - return NULL; + if (!PyArg_ParseTuple(args, + "u#;write() may only be called on" + " unicode strings", &ustr, &n)) + return NULL; - if (write_str(self, ustr, n) == -1) - return NULL; + if (write_str(self, ustr, n) == -1) + return NULL; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * string_io_writelines(StringIOObject *self, PyObject *v) { - PyObject *it, *item; + PyObject *it, *item; - if (self->buf == NULL) - return err_closed(); + if (self->buf == NULL) + return err_closed(); - it = PyObject_GetIter(v); - if (it == NULL) - return NULL; - - while ((item = PyIter_Next(it)) != NULL) { - Py_ssize_t n; - Py_UNICODE *ustr; - if ((ustr = PyUnicode_AsUnicode(item)) == NULL) { - PyErr_SetString(PyExc_TypeError, - "Need a list of unicode objects"); - Py_DECREF(it); - Py_DECREF(item); - return NULL; - } - n = PyUnicode_GetSize(item); - Py_DECREF(item); - - if (write_str(self, ustr, n) == -1) { - Py_DECREF(it); - return NULL; - } - } - Py_DECREF(it); - - /* See if PyIter_Next failed */ - if (PyErr_Occurred()) - return NULL; + it = PyObject_GetIter(v); + if (it == NULL) + return NULL; + + while ((item = PyIter_Next(it)) != NULL) { + Py_ssize_t n; + Py_UNICODE *ustr; + if ((ustr = PyUnicode_AsUnicode(item)) == NULL) { + PyErr_SetString(PyExc_TypeError, + "Need a list of unicode objects"); + Py_DECREF(it); + Py_DECREF(item); + return NULL; + } + n = PyUnicode_GetSize(item); + Py_DECREF(item); + + if (write_str(self, ustr, n) == -1) { + Py_DECREF(it); + return NULL; + } + } + Py_DECREF(it); + + /* See if PyIter_Next failed */ + if (PyErr_Occurred()) + return NULL; - Py_RETURN_NONE; + Py_RETURN_NONE; } static PyObject * string_io_close(StringIOObject *self) { - if (self->buf != NULL) - PyMem_Del(self->buf); - self->buf = NULL; + if (self->buf != NULL) + PyMem_Del(self->buf); + self->buf = NULL; - self->pos = self->string_size = self->buf_size = 0; + self->pos = self->string_size = self->buf_size = 0; - Py_RETURN_NONE; + Py_RETURN_NONE; } static void StringIO_dealloc(StringIOObject *op) { - if (op->buf != NULL) - PyMem_Del(op->buf); + if (op->buf != NULL) + PyMem_Del(op->buf); - op->ob_type->tp_free((PyObject *)op); + op->ob_type->tp_free((PyObject *)op); } static PyObject * StringIO_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - StringIOObject *self; - const Py_UNICODE *buf; - Py_ssize_t n = -1, size = BUFSIZE; - - assert(type != NULL && type->tp_alloc != NULL); - - if (!PyArg_ParseTuple(args, - "|u#;StringIO() may only given a" - " unicode string", &buf, &n)) - return NULL; - - self = (StringIOObject *)type->tp_alloc(type, 0); - - if (self == NULL) - return NULL; - - self->buf = PyMem_New(Py_UNICODE, size); - - /* These variables need to be initialized before attempting to write - anything to the object. */ - self->pos = 0; - self->string_size = 0; - - if (n > 0) { - if (write_str(self, buf, n) == -1) - return NULL; - self->pos = 0; - } - if (self->buf == NULL) { - Py_DECREF(self); - return PyErr_NoMemory(); - } - self->buf_size = size; + StringIOObject *self; + const Py_UNICODE *buf; + Py_ssize_t n = -1, size = BUFSIZE; + + assert(type != NULL && type->tp_alloc != NULL); + + if (!PyArg_ParseTuple(args, + "|u#;StringIO() may only given a" + " unicode string", &buf, &n)) + return NULL; + + self = (StringIOObject *)type->tp_alloc(type, 0); + + if (self == NULL) + return NULL; + + self->buf = PyMem_New(Py_UNICODE, size); + + /* These variables need to be initialized before attempting to write + anything to the object. */ + self->pos = 0; + self->string_size = 0; + + if (n > 0) { + if (write_str(self, buf, n) == -1) + return NULL; + self->pos = 0; + } + if (self->buf == NULL) { + Py_DECREF(self); + return PyErr_NoMemory(); + } + self->buf_size = size; - return (PyObject *)self; + return (PyObject *)self; } @@ -508,95 +508,95 @@ static PyGetSetDef StringIO_getsetlist[] = { - {"closed", (getter) string_io_get_closed, NULL, - "True if the file is closed"}, - {0}, /* sentinel */ + {"closed", (getter) string_io_get_closed, NULL, + "True if the file is closed"}, + {0}, /* sentinel */ }; static struct PyMethodDef StringIO_methods[] = { - {"flush", (PyCFunction) string_io_flush, METH_NOARGS, - StringIO_flush_doc}, - {"getvalue", (PyCFunction) string_io_getvalue, METH_VARARGS, - StringIO_getval_doc}, - {"isatty", (PyCFunction) string_io_isatty, METH_NOARGS, - StringIO_isatty_doc}, - {"read", (PyCFunction) string_io_read, METH_VARARGS, - StringIO_read_doc}, - {"readline", (PyCFunction) string_io_readline, METH_VARARGS, - StringIO_readline_doc}, - {"readlines", (PyCFunction) string_io_readlines, METH_VARARGS, - StringIO_readlines_doc}, - {"tell", (PyCFunction) string_io_tell, METH_NOARGS, - StringIO_tell_doc}, - {"truncate", (PyCFunction) string_io_truncate, METH_VARARGS, - StringIO_truncate_doc}, - {"close", (PyCFunction) string_io_close, METH_NOARGS, - StringIO_close_doc}, - {"seek", (PyCFunction) string_io_seek, METH_VARARGS, - StringIO_seek_doc}, - {"write", (PyCFunction) string_io_write, METH_VARARGS, - StringIO_write_doc}, - {"writelines", (PyCFunction) string_io_writelines, METH_O, - StringIO_writelines_doc}, - {NULL, NULL} /* sentinel */ + {"flush", (PyCFunction) string_io_flush, METH_NOARGS, + StringIO_flush_doc}, + {"getvalue", (PyCFunction) string_io_getvalue, METH_VARARGS, + StringIO_getval_doc}, + {"isatty", (PyCFunction) string_io_isatty, METH_NOARGS, + StringIO_isatty_doc}, + {"read", (PyCFunction) string_io_read, METH_VARARGS, + StringIO_read_doc}, + {"readline", (PyCFunction) string_io_readline, METH_VARARGS, + StringIO_readline_doc}, + {"readlines", (PyCFunction) string_io_readlines, METH_VARARGS, + StringIO_readlines_doc}, + {"tell", (PyCFunction) string_io_tell, METH_NOARGS, + StringIO_tell_doc}, + {"truncate", (PyCFunction) string_io_truncate, METH_VARARGS, + StringIO_truncate_doc}, + {"close", (PyCFunction) string_io_close, METH_NOARGS, + StringIO_close_doc}, + {"seek", (PyCFunction) string_io_seek, METH_VARARGS, + StringIO_seek_doc}, + {"write", (PyCFunction) string_io_write, METH_VARARGS, + StringIO_write_doc}, + {"writelines", (PyCFunction) string_io_writelines, METH_O, + StringIO_writelines_doc}, + {NULL, NULL} /* sentinel */ }; static PyTypeObject StringIO_Type = { - PyObject_HEAD_INIT(NULL) - 0, /*ob_size*/ - "_string_io.StringIO", /*tp_name*/ - sizeof(StringIOObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - /* methods */ - (destructor)StringIO_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - StringIO_doc, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - PyObject_SelfIter, /*tp_iter*/ - (iternextfunc)string_io_iternext, /*tp_iternext*/ - StringIO_methods, /*tp_methods*/ - 0, /*tp_members*/ - StringIO_getsetlist, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - StringIO_new, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ + PyObject_HEAD_INIT(NULL) + 0, /*ob_size*/ + "_string_io.StringIO", /*tp_name*/ + sizeof(StringIOObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)StringIO_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + StringIO_doc, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + PyObject_SelfIter, /*tp_iter*/ + (iternextfunc)string_io_iternext, /*tp_iternext*/ + StringIO_methods, /*tp_methods*/ + 0, /*tp_members*/ + StringIO_getsetlist, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + StringIO_new, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ }; PyMODINIT_FUNC init_string_io(void) { - PyObject *m; + PyObject *m; - if (PyType_Ready(&StringIO_Type) < 0) - return; - m = Py_InitModule3("_string_io", NULL, module_doc); - if (m == NULL) - return; - Py_INCREF(&StringIO_Type); - PyModule_AddObject(m, "StringIO", (PyObject *)&StringIO_Type); + if (PyType_Ready(&StringIO_Type) < 0) + return; + m = Py_InitModule3("_string_io", NULL, module_doc); + if (m == NULL) + return; + Py_INCREF(&StringIO_Type); + PyModule_AddObject(m, "StringIO", (PyObject *)&StringIO_Type); } From python-checkins at python.org Tue Jun 5 20:48:20 2007 From: python-checkins at python.org (martin.v.loewis) Date: Tue, 5 Jun 2007 20:48:20 +0200 (CEST) Subject: [Python-checkins] r55768 - peps/trunk/pep-3131.txt Message-ID: <20070605184820.1AB1F1E4005@bag.python.org> Author: martin.v.loewis Date: Tue Jun 5 20:48:18 2007 New Revision: 55768 Modified: peps/trunk/pep-3131.txt Log: Fix URL. Modified: peps/trunk/pep-3131.txt ============================================================================== --- peps/trunk/pep-3131.txt (original) +++ peps/trunk/pep-3131.txt Tue Jun 5 20:48:18 2007 @@ -87,7 +87,7 @@ A non-normative HTML file listing all valid identifier characters for Unicode 4.1 can be found at -http://www.dcl.hpi.uni-potsdam.de/home/loewis/table-331.html. +http://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html. Policy Specification ==================== From python-checkins at python.org Tue Jun 5 20:54:37 2007 From: python-checkins at python.org (martin.v.loewis) Date: Tue, 5 Jun 2007 20:54:37 +0200 (CEST) Subject: [Python-checkins] r55769 - peps/trunk/pep-3131.txt Message-ID: <20070605185437.138E91E4005@bag.python.org> Author: martin.v.loewis Date: Tue Jun 5 20:54:31 2007 New Revision: 55769 Modified: peps/trunk/pep-3131.txt Log: Add ?!ng's roundup. Modified: peps/trunk/pep-3131.txt ============================================================================== --- peps/trunk/pep-3131.txt (original) +++ peps/trunk/pep-3131.txt Tue Jun 5 20:54:31 2007 @@ -154,6 +154,91 @@ for RTL languages); if there is a need, these can be added later. +Another open issue is the choice of normalization form: some +people suggest to use NFKC instead of NFC, others suggest to +ban compatibility characters. + +Discussion +========== + +Ka-Ping Yee summarizes discussion and further objection +in [4]_ as such: + +A. Should identifiers be allowed to contain any Unicode letter? + + Drawbacks of allowing non-ASCII identifiers wholesale: + + 1. Python will lose the ability to make a reliable round trip to + a human-readable display on screen or on paper. + + 2. Python will become vulnerable to a new class of security exploits; + code and submitted patches will be much harder to inspect. + + 3. Humans will no longer be able to validate Python syntax. + + 4. Unicode is young; its problems are not yet well understood and + solved; tool support is weak. + + 5. Languages with non-ASCII identifiers use different character sets + and normalization schemes; PEP 3131's choices are non-obvious. + + 6. The Unicode bidi algorithm yields an extremely confusing display + order for RTL text when digits or operators are nearby. + + +B. Should the default behaviour accept only ASCII identifiers, or + should it accept identifiers containing non-ASCII characters? + + Arguments for ASCII only by default: + + 1. Non-ASCII identifiers by default makes common practice/assumptions + subtly/unknowingly wrong; rarely wrong is worse than obviously wrong. + + 2. Better to raise a warning than to fail silently when encountering + an probably unexpected situation. + + 3. All of current usage is ASCII-only; the vast majority of future + usage will be ASCII-only. + + 3. It is the pockets of Unicode adoption that are parochial, not the + ASCII advocates. + + 4. Python should audit for ASCII-only identifiers for the same + reasons that it audits for tab-space consistency + + 5. Incremental change is safer. + + 6. An ASCII-only default favors open-source development and sharing + of source code. + + 7. Existing projects won't have to waste any brainpower worrying + about the implications of Unicode identifiers. + +C. Should non-ASCII identifiers be optional? + + Various voices in support of a flag (although there's been debate + over which should be the default, no one seems to be saying that + there shouldn't be an off switch) + +D. Should the identifier character set be configurable? + + Various voices proposing and supporting a selectable character set, + so that users can get all the benefits of using their own language + without the drawbacks of confusable/unfamiliar characters + + +E. Which identifier characters should be allowed? + + 1. What to do about bidi format control characters? + + 2. What about other ID_Continue characters? What about characters + that look like punctuation? What about other recommendations + in UTS #39? What about mixed-script identifiers? + +F. Which normalization form should be used, NFC or NFKC? + +G. Should source code be required to be in normalized form? + References ========== @@ -161,6 +246,7 @@ .. [1] http://www.unicode.org/reports/tr31/ .. [2] http://www.unicode.org/reports/tr39/ .. [3] http://www.unicode.org/reports/tr36/ +.. [4] http://mail.python.org/pipermail/python-3000/2007-June/008161.html Copyright ========= From python-checkins at python.org Tue Jun 5 20:58:56 2007 From: python-checkins at python.org (hyeshik.chang) Date: Tue, 5 Jun 2007 20:58:56 +0200 (CEST) Subject: [Python-checkins] r55770 - in python/trunk: Lib/test/test_multibytecodec.py Misc/NEWS Modules/cjkcodecs/multibytecodec.c Message-ID: <20070605185856.280401E4005@bag.python.org> Author: hyeshik.chang Date: Tue Jun 5 20:58:51 2007 New Revision: 55770 Modified: python/trunk/Lib/test/test_multibytecodec.py python/trunk/Misc/NEWS python/trunk/Modules/cjkcodecs/multibytecodec.c Log: Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. Modified: python/trunk/Lib/test/test_multibytecodec.py ============================================================================== --- python/trunk/Lib/test/test_multibytecodec.py (original) +++ python/trunk/Lib/test/test_multibytecodec.py Tue Jun 5 20:58:51 2007 @@ -136,11 +136,19 @@ self.assertRaises(UnicodeDecodeError, decoder.decode, '', True) self.assertEqual(decoder.decode('B@$'), u'\u4e16') +class Test_StreamReader(unittest.TestCase): + def test_bug1728403(self): + try: + open(TESTFN, 'w').write('\xa1') + f = codecs.open(TESTFN, encoding='cp949') + self.assertRaises(UnicodeDecodeError, f.read, 2) + finally: + os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): if len(u'\U00012345') == 2: # UCS2 def test_gb18030(self): - s= StringIO.StringIO() + s = StringIO.StringIO() c = codecs.getwriter('gb18030')(s) c.write(u'123') self.assertEqual(s.getvalue(), '123') Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Tue Jun 5 20:58:51 2007 @@ -222,6 +222,10 @@ Library ------- +- Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it + reads a file that ends with incomplete sequence and sizehint argument + for .read() is specified. + - Bug #1730389: Change time.strptime() to use ``\s+`` instead of ``\s*`` when matching spaces in the specified format argument. Modified: python/trunk/Modules/cjkcodecs/multibytecodec.c ============================================================================== --- python/trunk/Modules/cjkcodecs/multibytecodec.c (original) +++ python/trunk/Modules/cjkcodecs/multibytecodec.c Tue Jun 5 20:58:51 2007 @@ -1214,6 +1214,8 @@ cres = NULL; for (;;) { + int endoffile; + if (sizehint < 0) cres = PyObject_CallMethod(self->stream, (char *)method, NULL); @@ -1230,6 +1232,8 @@ goto errorexit; } + endoffile = (PyString_GET_SIZE(cres) == 0); + if (self->pendingsize > 0) { PyObject *ctr; char *ctrdata; @@ -1257,7 +1261,7 @@ (MultibyteStatefulDecoderContext *)self, &buf)) goto errorexit; - if (rsize == 0 || sizehint < 0) { /* end of file */ + if (endoffile || sizehint < 0) { if (buf.inbuf < buf.inbuf_end && multibytecodec_decerror(self->codec, &self->state, &buf, self->errors, MBERR_TOOFEW)) From python-checkins at python.org Tue Jun 5 21:01:49 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 5 Jun 2007 21:01:49 +0200 (CEST) Subject: [Python-checkins] r55771 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070605190149.289D01E4010@bag.python.org> Author: alexandre.vassalotti Date: Tue Jun 5 21:01:46 2007 New Revision: 55771 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Document the use of direct memory manipulation. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Tue Jun 5 21:01:46 2007 @@ -64,8 +64,13 @@ new_len = self->pos + len; if (new_len >= self->buf_size) { + /* The size of the internal buffer double, every time we need more + memory. That reduces the need of resizing the buffer when working + with a large amount of data. */ self->buf_size *= 2; if (self->buf_size <= new_len) { + /* Doubling wasn't enough to hold the new internal string + size, then just use the new length. */ assert(new_len + 1 < PY_SSIZE_T_MAX); self->buf_size = new_len + 1; } @@ -79,11 +84,15 @@ } } + /* Copy the data to the internal buffer, overwriting some of the existing + data if self->pos < self->string_size. */ memcpy(self->buf + self->pos, bytes, len); assert(self->pos + len < PY_SSIZE_T_MAX); self->pos += len; + /* Unless we only overwritten some data, set the new length of the + internal string. */ if (self->string_size < self->pos) { self->string_size = self->pos; } Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Tue Jun 5 21:01:46 2007 @@ -58,16 +58,24 @@ static Py_ssize_t write_str(StringIOObject *self, const Py_UNICODE *ustr, Py_ssize_t len) { - Py_ssize_t newl; + Py_ssize_t new_len; assert(self->buf != NULL); - newl = self->pos + len; - if (newl >= self->buf_size) { + /* Here we doing some direct memory manipulation for speed and to keep the + implementation of this module relatively close to the implementation of + _bytes_io. */ + new_len = self->pos + len; + if (new_len >= self->buf_size) { + /* The size of the internal buffer double, every time we need more + memory. That reduces the need of resizing the buffer when working + with a large amount of data. */ self->buf_size *= 2; - if (self->buf_size <= newl) { - assert(newl + 1 < PY_SSIZE_T_MAX); - self->buf_size = newl + 1; + if (self->buf_size <= new_len) { + /* Doubling wasn't enough to hold the new internal string + size, then just use the new length. */ + assert(new_len + 1 < PY_SSIZE_T_MAX); + self->buf_size = new_len + 1; } PyMem_Resize(self->buf, Py_UNICODE, self->buf_size); @@ -79,11 +87,15 @@ } } + /* Copy the data to the internal buffer, overwriting some of the existing + data if self->pos < self->string_size. */ memcpy(self->buf + self->pos, ustr, len * sizeof(Py_UNICODE)); assert(self->pos + len < PY_SSIZE_T_MAX); self->pos += len; + /* Unless we only overwritten some data, set the new length of the + internal string. */ if (self->string_size < self->pos) { self->string_size = self->pos; } From python-checkins at python.org Tue Jun 5 21:03:04 2007 From: python-checkins at python.org (hyeshik.chang) Date: Tue, 5 Jun 2007 21:03:04 +0200 (CEST) Subject: [Python-checkins] r55772 - in python/branches/release24-maint: Lib/test/test_multibytecodec.py Misc/NEWS Modules/cjkcodecs/multibytecodec.c Message-ID: <20070605190304.231D41E4014@bag.python.org> Author: hyeshik.chang Date: Tue Jun 5 21:02:59 2007 New Revision: 55772 Modified: python/branches/release24-maint/Lib/test/test_multibytecodec.py python/branches/release24-maint/Misc/NEWS python/branches/release24-maint/Modules/cjkcodecs/multibytecodec.c Log: (Backport from r55770) Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. Modified: python/branches/release24-maint/Lib/test/test_multibytecodec.py ============================================================================== --- python/branches/release24-maint/Lib/test/test_multibytecodec.py (original) +++ python/branches/release24-maint/Lib/test/test_multibytecodec.py Tue Jun 5 21:02:59 2007 @@ -7,7 +7,17 @@ from test import test_support from test import test_multibytecodec_support -import unittest, StringIO, codecs, sys +from test.test_support import TESTFN +import unittest, StringIO, codecs, sys, os + +class Test_StreamReader(unittest.TestCase): + def test_bug1728403(self): + try: + open(TESTFN, 'w').write('\xa1') + f = codecs.open(TESTFN, encoding='cp949') + self.assertRaises(UnicodeDecodeError, f.read, 2) + finally: + os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): if len(u'\U00012345') == 2: # UCS2 @@ -99,6 +109,7 @@ def test_main(): suite = unittest.TestSuite() + suite.addTest(unittest.makeSuite(Test_StreamReader)) suite.addTest(unittest.makeSuite(Test_StreamWriter)) suite.addTest(unittest.makeSuite(Test_ISO2022)) test_support.run_suite(suite) Modified: python/branches/release24-maint/Misc/NEWS ============================================================================== --- python/branches/release24-maint/Misc/NEWS (original) +++ python/branches/release24-maint/Misc/NEWS Tue Jun 5 21:02:59 2007 @@ -26,6 +26,10 @@ Library ------- +- Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it + reads a file that ends with incomplete sequence and sizehint argument + for .read() is specified. + - HTML-escape the plain traceback in cgitb's HTML output, to prevent the traceback inadvertently or maliciously closing the comment and injecting HTML into the error page. Modified: python/branches/release24-maint/Modules/cjkcodecs/multibytecodec.c ============================================================================== --- python/branches/release24-maint/Modules/cjkcodecs/multibytecodec.c (original) +++ python/branches/release24-maint/Modules/cjkcodecs/multibytecodec.c Tue Jun 5 21:02:59 2007 @@ -705,6 +705,8 @@ cres = NULL; for (;;) { + int endoffile; + if (sizehint < 0) cres = PyObject_CallMethod(self->stream, (char *)method, NULL); @@ -721,6 +723,8 @@ goto errorexit; } + endoffile = (PyString_GET_SIZE(cres) == 0); + if (self->pendingsize > 0) { PyObject *ctr; char *ctrdata; @@ -772,7 +776,7 @@ goto errorexit; } - if (rsize == 0 || sizehint < 0) { /* end of file */ + if (endoffile || sizehint < 0) { /* end of file */ if (buf.inbuf < buf.inbuf_end && multibytecodec_decerror(self->codec, &self->state, &buf, self->errors, MBERR_TOOFEW)) From python-checkins at python.org Tue Jun 5 21:05:13 2007 From: python-checkins at python.org (martin.v.loewis) Date: Tue, 5 Jun 2007 21:05:13 +0200 (CEST) Subject: [Python-checkins] r55773 - peps/trunk/pep-3131.txt Message-ID: <20070605190513.33A161E400F@bag.python.org> Author: martin.v.loewis Date: Tue Jun 5 21:05:11 2007 New Revision: 55773 Modified: peps/trunk/pep-3131.txt Log: Add command line option issue as an open issue. Modified: peps/trunk/pep-3131.txt ============================================================================== --- peps/trunk/pep-3131.txt (original) +++ peps/trunk/pep-3131.txt Tue Jun 5 21:05:11 2007 @@ -158,6 +158,11 @@ people suggest to use NFKC instead of NFC, others suggest to ban compatibility characters. +Some people would like to see an option on selecting support +for this PEP at run-time; opinions vary on what precisely +that option should be, and what precisely its default value +should be. + Discussion ========== From python-checkins at python.org Tue Jun 5 21:14:36 2007 From: python-checkins at python.org (hyeshik.chang) Date: Tue, 5 Jun 2007 21:14:36 +0200 (CEST) Subject: [Python-checkins] r55774 - in python/branches/release25-maint: Lib/test/test_multibytecodec.py Misc/NEWS Modules/cjkcodecs/multibytecodec.c Message-ID: <20070605191436.86D6E1E4006@bag.python.org> Author: hyeshik.chang Date: Tue Jun 5 21:14:33 2007 New Revision: 55774 Modified: python/branches/release25-maint/Lib/test/test_multibytecodec.py python/branches/release25-maint/Misc/NEWS python/branches/release25-maint/Modules/cjkcodecs/multibytecodec.c Log: (Backport from r55770) Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. Modified: python/branches/release25-maint/Lib/test/test_multibytecodec.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_multibytecodec.py (original) +++ python/branches/release25-maint/Lib/test/test_multibytecodec.py Tue Jun 5 21:14:33 2007 @@ -136,6 +136,14 @@ self.assertRaises(UnicodeDecodeError, decoder.decode, '', True) self.assertEqual(decoder.decode('B@$'), u'\u4e16') +class Test_StreamReader(unittest.TestCase): + def test_bug1728403(self): + try: + open(TESTFN, 'w').write('\xa1') + f = codecs.open(TESTFN, encoding='cp949') + self.assertRaises(UnicodeDecodeError, f.read, 2) + finally: + os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): if len(u'\U00012345') == 2: # UCS2 @@ -223,6 +231,7 @@ suite.addTest(unittest.makeSuite(Test_MultibyteCodec)) suite.addTest(unittest.makeSuite(Test_IncrementalEncoder)) suite.addTest(unittest.makeSuite(Test_IncrementalDecoder)) + suite.addTest(unittest.makeSuite(Test_StreamReader)) suite.addTest(unittest.makeSuite(Test_StreamWriter)) suite.addTest(unittest.makeSuite(Test_ISO2022)) test_support.run_suite(suite) Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Tue Jun 5 21:14:33 2007 @@ -12,6 +12,10 @@ Library ------- +- Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it + reads a file that ends with incomplete sequence and sizehint argument + for .read() is specified. + - Bug #1730389: Have time.strptime() match spaces in a format argument with ``\s+`` instead of ``\s*``. Modified: python/branches/release25-maint/Modules/cjkcodecs/multibytecodec.c ============================================================================== --- python/branches/release25-maint/Modules/cjkcodecs/multibytecodec.c (original) +++ python/branches/release25-maint/Modules/cjkcodecs/multibytecodec.c Tue Jun 5 21:14:33 2007 @@ -1214,6 +1214,8 @@ cres = NULL; for (;;) { + int endoffile; + if (sizehint < 0) cres = PyObject_CallMethod(self->stream, (char *)method, NULL); @@ -1230,6 +1232,8 @@ goto errorexit; } + endoffile = (PyString_GET_SIZE(cres) == 0); + if (self->pendingsize > 0) { PyObject *ctr; char *ctrdata; @@ -1257,7 +1261,7 @@ (MultibyteStatefulDecoderContext *)self, &buf)) goto errorexit; - if (rsize == 0 || sizehint < 0) { /* end of file */ + if (endoffile || sizehint < 0) { if (buf.inbuf < buf.inbuf_end && multibytecodec_decerror(self->codec, &self->state, &buf, self->errors, MBERR_TOOFEW)) From buildbot at python.org Tue Jun 5 21:20:43 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 19:20:43 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-3 trunk Message-ID: <20070605192043.8405C1E4005@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%2520trunk/builds/20 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 2 tests failed: test_cProfile test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\work\trunk.heller-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' sincerely, -The Buildbot From buildbot at python.org Tue Jun 5 21:28:08 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 19:28:08 +0000 Subject: [Python-checkins] buildbot warnings in x86 W2k trunk Message-ID: <20070605192809.25FC71E4021@bag.python.org> The Buildbot has detected a new failure of x86 W2k trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520W2k%2520trunk/builds/335 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\trentm\data\buildbot\python-slave\trunk.mick-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' sincerely, -The Buildbot From python-checkins at python.org Tue Jun 5 21:28:22 2007 From: python-checkins at python.org (hyeshik.chang) Date: Tue, 5 Jun 2007 21:28:22 +0200 (CEST) Subject: [Python-checkins] r55775 - in python: branches/release24-maint/Lib/test/test_multibytecodec.py branches/release25-maint/Lib/test/test_multibytecodec.py trunk/Lib/test/test_multibytecodec.py Message-ID: <20070605192822.0E4821E4005@bag.python.org> Author: hyeshik.chang Date: Tue Jun 5 21:28:15 2007 New Revision: 55775 Modified: python/branches/release24-maint/Lib/test/test_multibytecodec.py python/branches/release25-maint/Lib/test/test_multibytecodec.py python/trunk/Lib/test/test_multibytecodec.py Log: Fix for Windows: close a temporary file before trying to delete it. Modified: python/branches/release24-maint/Lib/test/test_multibytecodec.py ============================================================================== --- python/branches/release24-maint/Lib/test/test_multibytecodec.py (original) +++ python/branches/release24-maint/Lib/test/test_multibytecodec.py Tue Jun 5 21:28:15 2007 @@ -17,6 +17,8 @@ f = codecs.open(TESTFN, encoding='cp949') self.assertRaises(UnicodeDecodeError, f.read, 2) finally: + try: f.close() + except: pass os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): Modified: python/branches/release25-maint/Lib/test/test_multibytecodec.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_multibytecodec.py (original) +++ python/branches/release25-maint/Lib/test/test_multibytecodec.py Tue Jun 5 21:28:15 2007 @@ -143,6 +143,8 @@ f = codecs.open(TESTFN, encoding='cp949') self.assertRaises(UnicodeDecodeError, f.read, 2) finally: + try: f.close() + except: pass os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): Modified: python/trunk/Lib/test/test_multibytecodec.py ============================================================================== --- python/trunk/Lib/test/test_multibytecodec.py (original) +++ python/trunk/Lib/test/test_multibytecodec.py Tue Jun 5 21:28:15 2007 @@ -143,6 +143,8 @@ f = codecs.open(TESTFN, encoding='cp949') self.assertRaises(UnicodeDecodeError, f.read, 2) finally: + try: f.close() + except: pass os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): From buildbot at python.org Tue Jun 5 21:37:21 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 19:37:21 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-3 2.5 Message-ID: <20070605193721.850FF1E4005@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%25202.5/builds/5 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\work\2.5.heller-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' sincerely, -The Buildbot From buildbot at python.org Tue Jun 5 21:53:23 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 19:53:23 +0000 Subject: [Python-checkins] buildbot warnings in x86 W2k 2.5 Message-ID: <20070605195323.E49621E4005@bag.python.org> The Buildbot has detected a new failure of x86 W2k 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520W2k%25202.5/builds/120 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\trentm\data\buildbot\python-slave\2.5.mick-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' sincerely, -The Buildbot From buildbot at python.org Tue Jun 5 21:54:37 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 19:54:37 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP trunk Message-ID: <20070605195437.BDA541E4005@bag.python.org> The Buildbot has detected a new failure of x86 XP trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP%2520trunk/builds/482 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot_py25\trunk.mcintyre-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' sincerely, -The Buildbot From python-checkins at python.org Tue Jun 5 22:01:35 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 5 Jun 2007 22:01:35 +0200 (CEST) Subject: [Python-checkins] r55777 - python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070605200135.06FB21E4013@bag.python.org> Author: alexandre.vassalotti Date: Tue Jun 5 22:01:31 2007 New Revision: 55777 Modified: python/branches/cpy_merge/Modules/_string_iomodule.c Log: Fix variable name in assertion. Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Tue Jun 5 22:01:31 2007 @@ -47,7 +47,7 @@ *output = self->buf + self->pos; assert(self->pos + len < PY_SSIZE_T_MAX); - assert(l >= 0); + assert(len >= 0); self->pos += len; return len; From buildbot at python.org Tue Jun 5 22:40:02 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 20:40:02 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-2 trunk Message-ID: <20070605204002.F289A1E4006@bag.python.org> The Buildbot has detected a new failure of x86 XP-2 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-2%2520trunk/builds/27 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Code\bb_slave\trunk.peters-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' Traceback (most recent call last): File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 460, in __bootstrap self.run() File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 440, in run self.__target(*self.__args, **self.__kwargs) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\bsddb\test\test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\bsddb\dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 460, in __bootstrap self.run() File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 440, in run self.__target(*self.__args, **self.__kwargs) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\bsddb\test\test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '0002-0002-0002-0002-0002' Traceback (most recent call last): File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 460, in __bootstrap self.run() File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 440, in run self.__target(*self.__args, **self.__kwargs) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\bsddb\test\test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '1001-1001-1001-1001-1001' Traceback (most recent call last): File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 460, in __bootstrap self.run() File "C:\Code\bb_slave\trunk.peters-windows\build\lib\threading.py", line 440, in run self.__target(*self.__args, **self.__kwargs) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\bsddb\test\test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "C:\Code\bb_slave\trunk.peters-windows\build\lib\unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '2000-2000-2000-2000-2000' sincerely, -The Buildbot From buildbot at python.org Tue Jun 5 22:40:06 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 20:40:06 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP 2.5 Message-ID: <20070605204006.823011E4005@bag.python.org> The Buildbot has detected a new failure of x86 XP 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP%25202.5/builds/241 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: hyeshik.chang Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_multibytecodec ====================================================================== ERROR: test_bug1728403 (test.test_multibytecodec.Test_StreamReader) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot_py25\2.5.mcintyre-windows\build\lib\test\test_multibytecodec.py", line 146, in test_bug1728403 os.unlink(TESTFN) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '@test' sincerely, -The Buildbot From python-checkins at python.org Tue Jun 5 23:21:29 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Tue, 5 Jun 2007 23:21:29 +0200 (CEST) Subject: [Python-checkins] r55782 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070605212129.354401E400D@bag.python.org> Author: alexandre.vassalotti Date: Tue Jun 5 23:21:24 2007 New Revision: 55782 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Fix a nasty bug, which caused Python to crash if the following (or similar) example was run: >>> import _bytes_io >>> b = _bytes_io.BytesIO("hello") >>> b.writelines(["hello", "hello"]) >>> b.close() Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Tue Jun 5 23:21:24 2007 @@ -424,6 +424,7 @@ anything to the object. */ self->pos = 0; self->string_size = 0; + self->buf_size = size; if (n > 0) { if (write_bytes(self, buf, n) == -1) @@ -434,7 +435,6 @@ Py_DECREF(self); return PyErr_NoMemory(); } - self->buf_size = size; return (PyObject *)self; } Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Tue Jun 5 23:21:24 2007 @@ -434,6 +434,7 @@ anything to the object. */ self->pos = 0; self->string_size = 0; + self->buf_size = size; if (n > 0) { if (write_str(self, buf, n) == -1) @@ -444,7 +445,6 @@ Py_DECREF(self); return PyErr_NoMemory(); } - self->buf_size = size; return (PyObject *)self; } From python-checkins at python.org Tue Jun 5 23:24:52 2007 From: python-checkins at python.org (guido.van.rossum) Date: Tue, 5 Jun 2007 23:24:52 +0200 (CEST) Subject: [Python-checkins] r55783 - python/trunk/Modules/_sqlite/cache.c Message-ID: <20070605212452.70CFD1E400D@bag.python.org> Author: guido.van.rossum Date: Tue Jun 5 23:24:47 2007 New Revision: 55783 Modified: python/trunk/Modules/_sqlite/cache.c Log: Patch by Tim Delany (missing DECREF). SF #1731330. Modified: python/trunk/Modules/_sqlite/cache.c ============================================================================== --- python/trunk/Modules/_sqlite/cache.c (original) +++ python/trunk/Modules/_sqlite/cache.c Tue Jun 5 23:24:47 2007 @@ -243,6 +243,7 @@ } template = PyString_FromString("%s <- %s ->%s\n"); if (!template) { + Py_DECREF(fmt_args); return NULL; } display_str = PyString_Format(template, fmt_args); From buildbot at python.org Tue Jun 5 23:48:46 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 05 Jun 2007 21:48:46 +0000 Subject: [Python-checkins] buildbot warnings in x86 mvlgcc trunk Message-ID: <20070605214846.B7FE71E4005@bag.python.org> The Buildbot has detected a new failure of x86 mvlgcc trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520mvlgcc%2520trunk/builds/589 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: guido.van.rossum Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/threading.py", line 460, in __bootstrap self.run() File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jun 6 00:06:34 2007 From: python-checkins at python.org (georg.brandl) Date: Wed, 6 Jun 2007 00:06:34 +0200 (CEST) Subject: [Python-checkins] r55784 - python/branches/release25-maint/Modules/_sqlite/cache.c Message-ID: <20070605220634.A02C11E4005@bag.python.org> Author: georg.brandl Date: Wed Jun 6 00:06:28 2007 New Revision: 55784 Modified: python/branches/release25-maint/Modules/_sqlite/cache.c Log: Backport rev. 55783: Patch by Tim Delany (missing DECREF). SF #1731330. Modified: python/branches/release25-maint/Modules/_sqlite/cache.c ============================================================================== --- python/branches/release25-maint/Modules/_sqlite/cache.c (original) +++ python/branches/release25-maint/Modules/_sqlite/cache.c Wed Jun 6 00:06:28 2007 @@ -243,6 +243,7 @@ } template = PyString_FromString("%s <- %s ->%s\n"); if (!template) { + Py_DECREF(fmt_args); return NULL; } display_str = PyString_Format(template, fmt_args); From python-checkins at python.org Wed Jun 6 02:17:36 2007 From: python-checkins at python.org (collin.winter) Date: Wed, 6 Jun 2007 02:17:36 +0200 (CEST) Subject: [Python-checkins] r55785 - in python/trunk: Doc/lib/libthreading.tex Lib/test/test_threading.py Lib/threading.py Message-ID: <20070606001736.BA3F71E4006@bag.python.org> Author: collin.winter Date: Wed Jun 6 02:17:35 2007 New Revision: 55785 Modified: python/trunk/Doc/lib/libthreading.tex python/trunk/Lib/test/test_threading.py python/trunk/Lib/threading.py Log: Patch #1731049: make threading.py use a proper "raise" when checking internal state, rather than assert statements (which get stripped out by -O). Modified: python/trunk/Doc/lib/libthreading.tex ============================================================================== --- python/trunk/Doc/lib/libthreading.tex (original) +++ python/trunk/Doc/lib/libthreading.tex Wed Jun 6 02:17:35 2007 @@ -174,11 +174,14 @@ unlocked, then the \method{acquire()} call resets it to locked and returns. The \method{release()} method should only be called in the locked state; it changes the state to unlocked and returns -immediately. When more than one thread is blocked in -\method{acquire()} waiting for the state to turn to unlocked, only one -thread proceeds when a \method{release()} call resets the state to -unlocked; which one of the waiting threads proceeds is not defined, -and may vary across implementations. +immediately. If an attempt is made to release an unlocked lock, a +\exception{RuntimeError} will be raised. + +When more than one thread is blocked in \method{acquire()} waiting for +the state to turn to unlocked, only one thread proceeds when a +\method{release()} call resets the state to unlocked; which one of the +waiting threads proceeds is not defined, and may vary across +implementations. All methods are executed atomically. @@ -257,8 +260,9 @@ decrement the recursion level is still nonzero, the lock remains locked and owned by the calling thread. -Only call this method when the calling thread owns the lock. -Do not call this method when the lock is unlocked. +Only call this method when the calling thread owns the lock. A +\exception{RuntimeError} is raised if this method is called when the +lock is unlocked. There is no return value. \end{methoddesc} @@ -275,7 +279,8 @@ methods that call the corresponding methods of the associated lock. It also has a \method{wait()} method, and \method{notify()} and \method{notifyAll()} methods. These three must only be called when -the calling thread has acquired the lock. +the calling thread has acquired the lock, otherwise a +\exception{RuntimeError} is raised. The \method{wait()} method releases the lock, and then blocks until it is awakened by a \method{notify()} or \method{notifyAll()} call for @@ -343,9 +348,9 @@ \end{methoddesc} \begin{methoddesc}{wait}{\optional{timeout}} -Wait until notified or until a timeout occurs. -This must only be called when the calling thread has acquired the -lock. +Wait until notified or until a timeout occurs. If the calling thread +has not acquired the lock when this method is called, a +\exception{RuntimeError} is raised. This method releases the underlying lock, and then blocks until it is awakened by a \method{notify()} or \method{notifyAll()} call for the @@ -367,9 +372,10 @@ \end{methoddesc} \begin{methoddesc}{notify}{} -Wake up a thread waiting on this condition, if any. -This must only be called when the calling thread has acquired the -lock. +Wake up a thread waiting on this condition, if any. Wait until +notified or until a timeout occurs. If the calling thread has not +acquired the lock when this method is called, a +\exception{RuntimeError} is raised. This method wakes up one of the threads waiting for the condition variable, if any are waiting; it is a no-op if no threads are waiting. @@ -386,7 +392,9 @@ \begin{methoddesc}{notifyAll}{} Wake up all threads waiting on this condition. This method acts like -\method{notify()}, but wakes up all waiting threads instead of one. +\method{notify()}, but wakes up all waiting threads instead of one. If +the calling thread has not acquired the lock when this method is +called, a \exception{RuntimeError} is raised. \end{methoddesc} @@ -404,8 +412,9 @@ calls \method{release()}. \begin{classdesc}{Semaphore}{\optional{value}} -The optional argument gives the initial value for the internal -counter; it defaults to \code{1}. +The optional argument gives the initial \var{value} for the internal +counter; it defaults to \code{1}. If the \var{value} given is less +than 0, \exception{ValueError} is raised. \end{classdesc} \begin{methoddesc}{acquire}{\optional{blocking}} @@ -586,9 +595,12 @@ \begin{methoddesc}{start}{} Start the thread's activity. -This must be called at most once per thread object. It -arranges for the object's \method{run()} method to be invoked in a -separate thread of control. +It must be called at most once per thread object. It arranges for the +object's \method{run()} method to be invoked in a separate thread of +control. + +This method will raise a \exception{RuntimeException} if called more +than once on the same thread object. \end{methoddesc} \begin{methoddesc}{run}{} @@ -618,11 +630,10 @@ A thread can be \method{join()}ed many times. -A thread cannot join itself because this would cause a -deadlock. - -It is an error to attempt to \method{join()} a thread before it has -been started. +\method{join()} may throw a \exception{RuntimeError}, if an attempt is +made to join the current thread as that would cause a deadlock. It is +also an error to \method{join()} a thread before it has been started +and attempts to do so raises same exception. \end{methoddesc} \begin{methoddesc}{getName}{} @@ -651,7 +662,8 @@ \begin{methoddesc}{setDaemon}{daemonic} Set the thread's daemon flag to the Boolean value \var{daemonic}. -This must be called before \method{start()} is called. +This must be called before \method{start()} is called, otherwise +\exception{RuntimeError} is raised. The initial value is inherited from the creating thread. Modified: python/trunk/Lib/test/test_threading.py ============================================================================== --- python/trunk/Lib/test/test_threading.py (original) +++ python/trunk/Lib/test/test_threading.py Wed Jun 6 02:17:35 2007 @@ -3,6 +3,7 @@ import test.test_support from test.test_support import verbose import random +import sys import threading import thread import time @@ -201,8 +202,47 @@ t.join() # else the thread is still running, and we have no way to kill it +class ThreadingExceptionTests(unittest.TestCase): + # A RuntimeError should be raised if Thread.start() is called + # multiple times. + def test_start_thread_again(self): + thread = threading.Thread() + thread.start() + self.assertRaises(RuntimeError, thread.start) + + def test_releasing_unacquired_rlock(self): + rlock = threading.RLock() + self.assertRaises(RuntimeError, rlock.release) + + def test_waiting_on_unacquired_condition(self): + cond = threading.Condition() + self.assertRaises(RuntimeError, cond.wait) + + def test_notify_on_unacquired_condition(self): + cond = threading.Condition() + self.assertRaises(RuntimeError, cond.notify) + + def test_semaphore_with_negative_value(self): + self.assertRaises(ValueError, threading.Semaphore, value = -1) + self.assertRaises(ValueError, threading.Semaphore, value = -sys.maxint) + + def test_joining_current_thread(self): + currentThread = threading.currentThread() + self.assertRaises(RuntimeError, currentThread.join); + + def test_joining_inactive_thread(self): + thread = threading.Thread() + self.assertRaises(RuntimeError, thread.join) + + def test_daemonize_active_thread(self): + thread = threading.Thread() + thread.start() + self.assertRaises(RuntimeError, thread.setDaemon, True) + + def test_main(): - test.test_support.run_unittest(ThreadTests) + test.test_support.run_unittest(ThreadTests, + ThreadingExceptionTests) if __name__ == "__main__": test_main() Modified: python/trunk/Lib/threading.py ============================================================================== --- python/trunk/Lib/threading.py (original) +++ python/trunk/Lib/threading.py Wed Jun 6 02:17:35 2007 @@ -111,8 +111,8 @@ __enter__ = acquire def release(self): - me = currentThread() - assert self.__owner is me, "release() of un-acquire()d lock" + if self.__owner is not currentThread(): + raise RuntimeError("cannot release un-aquired lock") self.__count = count = self.__count - 1 if not count: self.__owner = None @@ -204,7 +204,8 @@ return True def wait(self, timeout=None): - assert self._is_owned(), "wait() of un-acquire()d lock" + if not self._is_owned(): + raise RuntimeError("cannot wait on un-aquired lock") waiter = _allocate_lock() waiter.acquire() self.__waiters.append(waiter) @@ -245,7 +246,8 @@ self._acquire_restore(saved_state) def notify(self, n=1): - assert self._is_owned(), "notify() of un-acquire()d lock" + if not self._is_owned(): + raise RuntimeError("cannot notify on un-aquired lock") __waiters = self.__waiters waiters = __waiters[:n] if not waiters: @@ -273,7 +275,8 @@ # After Tim Peters' semaphore class, but not quite the same (no maximum) def __init__(self, value=1, verbose=None): - assert value >= 0, "Semaphore initial value must be >= 0" + if value < 0: + raise ValueError("semaphore initial value must be >= 0") _Verbose.__init__(self, verbose) self.__cond = Condition(Lock()) self.__value = value @@ -424,8 +427,10 @@ return "<%s(%s, %s)>" % (self.__class__.__name__, self.__name, status) def start(self): - assert self.__initialized, "Thread.__init__() not called" - assert not self.__started, "thread already started" + if not self.__initialized: + raise RuntimeError("thread.__init__() not called") + if self.__started: + raise RuntimeError("thread already started") if __debug__: self._note("%s.start(): starting thread", self) _active_limbo_lock.acquire() @@ -545,9 +550,13 @@ _active_limbo_lock.release() def join(self, timeout=None): - assert self.__initialized, "Thread.__init__() not called" - assert self.__started, "cannot join thread before it is started" - assert self is not currentThread(), "cannot join current thread" + if not self.__initialized: + raise RuntimeError("Thread.__init__() not called") + if not self.__started: + raise RuntimeError("cannot join thread before it is started") + if self is currentThread(): + raise RuntimeError("cannot join current thread") + if __debug__: if not self.__stopped: self._note("%s.join(): waiting until thread stops", self) @@ -590,8 +599,10 @@ return self.__daemonic def setDaemon(self, daemonic): - assert self.__initialized, "Thread.__init__() not called" - assert not self.__started, "cannot set daemon status of active thread" + if not self.__initialized: + raise RuntimeError("Thread.__init__() not called") + if self.__started: + raise RuntimeError("cannot set daemon status of active thread"); self.__daemonic = daemonic # The timer class was contributed by Itamar Shtull-Trauring From python-checkins at python.org Wed Jun 6 17:13:42 2007 From: python-checkins at python.org (facundo.batista) Date: Wed, 6 Jun 2007 17:13:42 +0200 (CEST) Subject: [Python-checkins] r55786 - in python/trunk: Lib/ftplib.py Misc/NEWS Message-ID: <20070606151342.37DD51E4005@bag.python.org> Author: facundo.batista Date: Wed Jun 6 17:13:37 2007 New Revision: 55786 Modified: python/trunk/Lib/ftplib.py python/trunk/Misc/NEWS Log: FTP.ntransfercmd method now uses create_connection when passive, using the timeout received in connection time. Modified: python/trunk/Lib/ftplib.py ============================================================================== --- python/trunk/Lib/ftplib.py (original) +++ python/trunk/Lib/ftplib.py Wed Jun 6 17:13:37 2007 @@ -319,9 +319,7 @@ size = None if self.passiveserver: host, port = self.makepasv() - af, socktype, proto, canon, sa = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] - conn = socket.socket(af, socktype, proto) - conn.connect(sa) + conn = socket.create_connection((host, port), self.timeout) if rest is not None: self.sendcmd("REST %s" % rest) resp = self.sendcmd(cmd) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jun 6 17:13:37 2007 @@ -222,6 +222,10 @@ Library ------- +- In ftplib, the FTP.ntransfercmd method, when in passive mode, now uses + the socket.create_connection function, using the timeout specified at + connection time. + - Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. From python-checkins at python.org Wed Jun 6 19:15:29 2007 From: python-checkins at python.org (facundo.batista) Date: Wed, 6 Jun 2007 19:15:29 +0200 (CEST) Subject: [Python-checkins] r55792 - in python/trunk: Doc/lib/liburllib2.tex Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/urllib2.py Misc/NEWS Message-ID: <20070606171529.03FE61E400D@bag.python.org> Author: facundo.batista Date: Wed Jun 6 19:15:23 2007 New Revision: 55792 Modified: python/trunk/Doc/lib/liburllib2.tex python/trunk/Lib/test/test_urllib2.py python/trunk/Lib/test/test_urllib2net.py python/trunk/Lib/urllib2.py python/trunk/Misc/NEWS Log: Added an optional timeout parameter to function urllib2.urlopen, with tests in test_urllib2net.py (must have network resource enabled to execute them). Also modified test_urllib2.py because testing mock classes must take it into acount. Docs are also updated. Modified: python/trunk/Doc/lib/liburllib2.tex ============================================================================== --- python/trunk/Doc/lib/liburllib2.tex (original) +++ python/trunk/Doc/lib/liburllib2.tex Wed Jun 6 19:15:23 2007 @@ -14,7 +14,7 @@ The \module{urllib2} module defines the following functions: -\begin{funcdesc}{urlopen}{url\optional{, data}} +\begin{funcdesc}{urlopen}{url\optional{, data}\optional{, timeout}} Open the URL \var{url}, which can be either a string or a \class{Request} object. @@ -27,6 +27,11 @@ \function{urllib.urlencode()} function takes a mapping or sequence of 2-tuples and returns a string in this format. +The optional \var{timeout} parameter specifies a timeout in seconds for the +connection attempt (if not specified, or passed as None, the global default +timeout setting will be used). This actually only work for HTTP, HTTPS, FTP +and FTPS connections. + This function returns a file-like object with two additional methods: \begin{itemize} @@ -351,12 +356,17 @@ \end{itemize} \end{methoddesc} -\begin{methoddesc}[OpenerDirector]{open}{url\optional{, data}} +\begin{methoddesc}[OpenerDirector]{open}{url\optional{, data}{\optional{, timeout}}} Open the given \var{url} (which can be a request object or a string), optionally passing the given \var{data}. Arguments, return values and exceptions raised are the same as those of \function{urlopen()} (which simply calls the \method{open()} method -on the currently installed global \class{OpenerDirector}). +on the currently installed global \class{OpenerDirector}). The optional +\var{timeout} parameter specifies a timeout in seconds for the connection +attempt (if not specified, or passed as None, the global default timeout +setting will be used; this actually only work for HTTP, HTTPS, FTP +and FTPS connections). + \end{methoddesc} \begin{methoddesc}[OpenerDirector]{error}{proto\optional{, Modified: python/trunk/Lib/test/test_urllib2.py ============================================================================== --- python/trunk/Lib/test/test_urllib2.py (original) +++ python/trunk/Lib/test/test_urllib2.py Wed Jun 6 19:15:23 2007 @@ -545,7 +545,7 @@ class NullFTPHandler(urllib2.FTPHandler): def __init__(self, data): self.data = data - def connect_ftp(self, user, passwd, host, port, dirs): + def connect_ftp(self, user, passwd, host, port, dirs, timeout=None): self.user, self.passwd = user, passwd self.host, self.port = host, port self.dirs = dirs @@ -568,7 +568,9 @@ "localhost", ftplib.FTP_PORT, "A", [], "baz.gif", None), # XXX really this should guess image/gif ]: - r = h.ftp_open(Request(url)) + req = Request(url) + req.timeout = None + r = h.ftp_open(req) # ftp authentication not yet implemented by FTPHandler self.assert_(h.user == h.passwd == "") self.assertEqual(h.host, socket.gethostbyname(host)) @@ -683,8 +685,9 @@ self.req_headers = [] self.data = None self.raise_on_endheaders = False - def __call__(self, host): + def __call__(self, host, timeout=None): self.host = host + self.timeout = timeout return self def set_debuglevel(self, level): self.level = level @@ -707,6 +710,7 @@ url = "http://example.com/" for method, data in [("GET", None), ("POST", "blah")]: req = Request(url, data, {"Foo": "bar"}) + req.timeout = None req.add_unredirected_header("Spam", "eggs") http = MockHTTPClass() r = h.do_open(http, req) Modified: python/trunk/Lib/test/test_urllib2net.py ============================================================================== --- python/trunk/Lib/test/test_urllib2net.py (original) +++ python/trunk/Lib/test/test_urllib2net.py Wed Jun 6 19:15:23 2007 @@ -267,6 +267,49 @@ return handlers +class TimeoutTest(unittest.TestCase): + def test_http_basic(self): + u = urllib2.urlopen("http://www.python.org") + self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None) + + def test_http_NoneWithdefault(self): + prev = socket.getdefaulttimeout() + socket.setdefaulttimeout(60) + try: + u = urllib2.urlopen("http://www.python.org", timeout=None) + self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 60) + finally: + socket.setdefaulttimeout(prev) + + def test_http_Value(self): + u = urllib2.urlopen("http://www.python.org", timeout=120) + self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 120) + + def test_http_NoneNodefault(self): + u = urllib2.urlopen("http://www.python.org", timeout=None) + self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None) + + def test_ftp_basic(self): + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/") + self.assertTrue(u.fp.fp._sock.gettimeout() is None) + + def test_ftp_NoneWithdefault(self): + prev = socket.getdefaulttimeout() + socket.setdefaulttimeout(60) + try: + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None) + self.assertEqual(u.fp.fp._sock.gettimeout(), 60) + finally: + socket.setdefaulttimeout(prev) + + def test_ftp_NoneNodefault(self): + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None) + self.assertTrue(u.fp.fp._sock.gettimeout() is None) + + def test_ftp_Value(self): + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=60) + self.assertEqual(u.fp.fp._sock.gettimeout(), 60) + def test_main(): test_support.requires("network") @@ -275,6 +318,7 @@ AuthTests, OtherNetworkTests, CloseSocketTest, + TimeoutTest, ) if __name__ == "__main__": Modified: python/trunk/Lib/urllib2.py ============================================================================== --- python/trunk/Lib/urllib2.py (original) +++ python/trunk/Lib/urllib2.py Wed Jun 6 19:15:23 2007 @@ -117,11 +117,11 @@ __version__ = sys.version[:3] _opener = None -def urlopen(url, data=None): +def urlopen(url, data=None, timeout=None): global _opener if _opener is None: _opener = build_opener() - return _opener.open(url, data) + return _opener.open(url, data, timeout) def install_opener(opener): global _opener @@ -355,7 +355,7 @@ if result is not None: return result - def open(self, fullurl, data=None): + def open(self, fullurl, data=None, timeout=None): # accept a URL or a Request object if isinstance(fullurl, basestring): req = Request(fullurl, data) @@ -364,6 +364,7 @@ if data is not None: req.add_data(data) + req.timeout = timeout protocol = req.get_type() # pre-process request @@ -1057,7 +1058,7 @@ if not host: raise URLError('no host given') - h = http_class(host) # will parse host:port + h = http_class(host, timeout=req.timeout) # will parse host:port h.set_debuglevel(self._debuglevel) headers = dict(req.headers) @@ -1269,7 +1270,7 @@ if dirs and not dirs[0]: dirs = dirs[1:] try: - fw = self.connect_ftp(user, passwd, host, port, dirs) + fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout) type = file and 'I' or 'D' for attr in attrs: attr, value = splitvalue(attr) @@ -1289,8 +1290,8 @@ except ftplib.all_errors, msg: raise IOError, ('ftp error', msg), sys.exc_info()[2] - def connect_ftp(self, user, passwd, host, port, dirs): - fw = ftpwrapper(user, passwd, host, port, dirs) + def connect_ftp(self, user, passwd, host, port, dirs, timeout): + fw = ftpwrapper(user, passwd, host, port, dirs, timeout) ## fw.ftp.set_debuglevel(1) return fw @@ -1310,12 +1311,12 @@ def setMaxConns(self, m): self.max_conns = m - def connect_ftp(self, user, passwd, host, port, dirs): - key = user, host, port, '/'.join(dirs) + def connect_ftp(self, user, passwd, host, port, dirs, timeout): + key = user, host, port, '/'.join(dirs), timeout if key in self.cache: self.timeout[key] = time.time() + self.delay else: - self.cache[key] = ftpwrapper(user, passwd, host, port, dirs) + self.cache[key] = ftpwrapper(user, passwd, host, port, dirs, timeout) self.timeout[key] = time.time() + self.delay self.check_cache() return self.cache[key] Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jun 6 19:15:23 2007 @@ -222,6 +222,9 @@ Library ------- +- The urlopen function of urllib2 now has an optional timeout parameter (note + that it actually works with HTTP, HTTPS, FTP and FTPS connections). + - In ftplib, the FTP.ntransfercmd method, when in passive mode, now uses the socket.create_connection function, using the timeout specified at connection time. From g.brandl at gmx.net Wed Jun 6 20:06:03 2007 From: g.brandl at gmx.net (Georg Brandl) Date: Wed, 06 Jun 2007 20:06:03 +0200 Subject: [Python-checkins] r55792 - in python/trunk: Doc/lib/liburllib2.tex Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/urllib2.py Misc/NEWS In-Reply-To: <20070606171529.03FE61E400D@bag.python.org> References: <20070606171529.03FE61E400D@bag.python.org> Message-ID: facundo.batista schrieb: > \begin{itemize} > @@ -351,12 +356,17 @@ > \end{itemize} > \end{methoddesc} > > -\begin{methoddesc}[OpenerDirector]{open}{url\optional{, data}} > +\begin{methoddesc}[OpenerDirector]{open}{url\optional{, data}{\optional{, timeout}}} > Open the given \var{url} (which can be a request object or a string), > optionally passing the given \var{data}. > Arguments, return values and exceptions raised are the same as those > of \function{urlopen()} (which simply calls the \method{open()} method > -on the currently installed global \class{OpenerDirector}). > +on the currently installed global \class{OpenerDirector}). The optional > +\var{timeout} parameter specifies a timeout in seconds for the connection > +attempt (if not specified, or passed as None, the global default timeout > +setting will be used; this actually only work for HTTP, HTTPS, FTP > +and FTPS connections). > + You need a \versionadded for the timeout parameter. This also applies to all other locations where you added such a parameter. Thanks, Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. From facundobatista at gmail.com Wed Jun 6 21:26:08 2007 From: facundobatista at gmail.com (Facundo Batista) Date: Wed, 6 Jun 2007 16:26:08 -0300 Subject: [Python-checkins] r55792 - in python/trunk: Doc/lib/liburllib2.tex Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/urllib2.py Misc/NEWS In-Reply-To: References: <20070606171529.03FE61E400D@bag.python.org> Message-ID: 2007/6/6, Georg Brandl : > You need a \versionadded for the timeout parameter. This also applies to > all other locations where you added such a parameter. \versionadded or \versionchanged (both are new to me, I'm trying to infer their meaning from actual .tex's). I actually added a timeout parameter to a lot of places. Those places already existed before the changes. Shall I mark those changes as... \versionchanged[Blah blah blah]{2.6} ...? Thank you very much! -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ From g.brandl at gmx.net Wed Jun 6 21:50:40 2007 From: g.brandl at gmx.net (Georg Brandl) Date: Wed, 06 Jun 2007 21:50:40 +0200 Subject: [Python-checkins] r55792 - in python/trunk: Doc/lib/liburllib2.tex Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/urllib2.py Misc/NEWS In-Reply-To: References: <20070606171529.03FE61E400D@bag.python.org> Message-ID: <46671010.5020501@gmx.net> Facundo Batista schrieb: > 2007/6/6, Georg Brandl : > >> You need a \versionadded for the timeout parameter. This also applies to >> all other locations where you added such a parameter. > > \versionadded or \versionchanged (both are new to me, I'm trying to > infer their meaning from actual .tex's). > > I actually added a timeout parameter to a lot of places. Those places > already existed before the changes. > > Shall I mark those changes as... > > \versionchanged[Blah blah blah]{2.6} > > ...? Either \versionadded[The \var{timeout} parameter]{2.6} or \versionchanged[The \var{timeout} parameter was added]{2.6} would be fine with me. (Side note: there's no trailing dot after the sentence) Georg -- Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out. From python-checkins at python.org Wed Jun 6 22:19:22 2007 From: python-checkins at python.org (thomas.heller) Date: Wed, 6 Jun 2007 22:19:22 +0200 (CEST) Subject: [Python-checkins] r55793 - python/trunk/PCbuild/pcbuild.sln Message-ID: <20070606201922.A085B1E4005@bag.python.org> Author: thomas.heller Date: Wed Jun 6 22:19:19 2007 New Revision: 55793 Modified: python/trunk/PCbuild/pcbuild.sln Log: Build _ctypes and _ctypes_test in the ReleaseAMD64 configuration. Modified: python/trunk/PCbuild/pcbuild.sln ============================================================================== --- python/trunk/PCbuild/pcbuild.sln (original) +++ python/trunk/PCbuild/pcbuild.sln Wed Jun 6 22:19:19 2007 @@ -259,12 +259,14 @@ {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.ActiveCfg = Release|Win32 {F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.Build.0 = Release|Win32 {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.ActiveCfg = Debug|Win32 {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.Build.0 = Debug|Win32 {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.ActiveCfg = Release|Win32 {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.Build.0 = Release|Win32 {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug.ActiveCfg = Debug|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.Debug.Build.0 = Debug|Win32 From buildbot at python.org Wed Jun 6 22:50:54 2007 From: buildbot at python.org (buildbot at python.org) Date: Wed, 06 Jun 2007 20:50:54 +0000 Subject: [Python-checkins] buildbot warnings in x86 gentoo trunk Message-ID: <20070606205054.624831E4005@bag.python.org> The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520gentoo%2520trunk/builds/2251 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_telnetlib ====================================================================== ERROR: testBasic (test.test_telnetlib.GeneralTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_telnetlib.py", line 36, in testBasic telnet = telnetlib.Telnet("localhost", 9091) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/telnetlib.py", line 209, in __init__ self.open(host, port, timeout) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/telnetlib.py", line 227, in open self.sock = socket.create_connection((host, port), self.timeout) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/socket.py", line 443, in create_connection raise error, msg error: (111, 'Connection refused') make: *** [buildbottest] Error 1 sincerely, -The Buildbot From fdrake at acm.org Thu Jun 7 02:51:48 2007 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Wed, 6 Jun 2007 20:51:48 -0400 Subject: [Python-checkins] r55792 - in python/trunk: Doc/lib/liburllib2.tex Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/urllib2.py Misc/NEWS In-Reply-To: References: <20070606171529.03FE61E400D@bag.python.org> Message-ID: <200706062051.48328.fdrake@acm.org> On Wednesday 06 June 2007, Facundo Batista wrote: > \versionadded or \versionchanged (both are new to me, I'm trying to > infer their meaning from actual .tex's). There's documentation: http://docs.python.org/doc/inline-markup.html > Shall I mark those changes as... > > \versionchanged[Blah blah blah]{2.6} That's it! -Fred -- Fred L. Drake, Jr. From buildbot at python.org Thu Jun 7 07:30:59 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 05:30:59 +0000 Subject: [Python-checkins] buildbot warnings in ppc Debian unstable 2.5 Message-ID: <20070607053100.25EE51E4005@bag.python.org> The Buildbot has detected a new failure of ppc Debian unstable 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/ppc%2520Debian%2520unstable%25202.5/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: brett.cannon,georg.brandl,hyeshik.chang,neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/threading.py", line 460, in __bootstrap self.run() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 81, in run svr = svrcls(self.__addr, self.__hdlrcls) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/SocketServer.py", line 330, in __init__ self.server_bind() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 159, in server_bind TCPServer.server_bind(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address) File "", line 1, in bind gaierror: (-2, 'Name or service not known') 4 tests failed: test_socket test_socket_ssl test_socketserver test_urllib2 ====================================================================== ERROR: testSockName (test.test_socket.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 456, in testSockName my_ip_addr = socket.gethostbyname(socket.gethostname()) gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testFromFd (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testOverFlowRecv (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testOverFlowRecvFrom (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecv (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecvFrom (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSendAll (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testShutdown (test.test_socket.BasicTCPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testClose (test.test_socket.TCPCloserTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testInterruptedTimeout (test.test_socket.TCPTimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testTCPTimeout (test.test_socket.TCPTimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testTimeoutZero (test.test_socket.TCPTimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecvFromInto (test.test_socket.BufferIOTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecvInto (test.test_socket.BufferIOTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecvFrom (test.test_socket.BasicUDPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 39, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecvFromNegative (test.test_socket.BasicUDPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 39, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSendtoAndRecv (test.test_socket.BasicUDPTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 39, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testTimeoutZero (test.test_socket.UDPTimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testUDPTimeout (test.test_socket.UDPTimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testAccept (test.test_socket.NonBlockingTCPTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testConnect (test.test_socket.NonBlockingTCPTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testRecv (test.test_socket.NonBlockingTCPTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSetBlocking (test.test_socket.NonBlockingTCPTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testClosedAttr (test.test_socket.FileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testFullRead (test.test_socket.FileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testReadline (test.test_socket.FileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSmallRead (test.test_socket.FileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testUnbufferedRead (test.test_socket.FileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testClosedAttr (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testFullRead (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testReadline (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSmallRead (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testUnbufferedRead (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testUnbufferedReadline (test.test_socket.UnbufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testClosedAttr (test.test_socket.LineBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testFullRead (test.test_socket.LineBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testReadline (test.test_socket.LineBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSmallRead (test.test_socket.LineBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testUnbufferedRead (test.test_socket.LineBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testClosedAttr (test.test_socket.SmallBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testFullRead (test.test_socket.SmallBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testReadline (test.test_socket.SmallBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testSmallRead (test.test_socket.SmallBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: testUnbufferedRead (test.test_socket.SmallBufferedFileObjectClassTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 111, in _setUp self.__setUp() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 703, in setUp SocketConnectedTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 172, in setUp ThreadedTCPSocketTest.setUp(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket.py", line 26, in setUp PORT = test_support.bind_port(self.serv, HOST, PORT) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_support.py", line 101, in bind_port sock.bind((host, port)) File "", line 1, in bind gaierror: (-2, 'Name or service not known') Traceback (most recent call last): File "./Lib/test/regrtest.py", line 557, in runtest_inner indirect_test() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket_ssl.py", line 129, in test_main test_rude_shutdown() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket_ssl.py", line 123, in test_rude_shutdown connector() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socket_ssl.py", line 111, in connector s.connect(('localhost', PORT[0])) File "", line 1, in connect gaierror: (-2, 'Name or service not known') Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/threading.py", line 460, in __bootstrap self.run() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 81, in run svr = svrcls(self.__addr, self.__hdlrcls) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/SocketServer.py", line 330, in __init__ self.server_bind() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 159, in server_bind TCPServer.server_bind(self) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address) File "", line 1, in bind gaierror: (-2, 'Name or service not known') Traceback (most recent call last): File "./Lib/test/regrtest.py", line 557, in runtest_inner indirect_test() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 212, in test_main testall() File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 195, in testall testloop(socket.AF_INET, tcpservers, MyStreamHandler, teststream) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 144, in testloop testfunc(proto, addr) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 62, in teststream s.connect(addr) File "", line 1, in connect gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: test_file (test.test_urllib2.HandlerTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_urllib2.py", line 594, in test_file "file://%s%s" % (socket.gethostbyname('localhost'), urlpath), gaierror: (-2, 'Name or service not known') ====================================================================== ERROR: test_ftp (test.test_urllib2.HandlerTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/test/test_urllib2.py", line 571, in test_ftp r = h.ftp_open(Request(url)) File "/home/pybot/buildarea/2.5.klose-debian-ppc/build/Lib/urllib2.py", line 1260, in ftp_open raise URLError(msg) URLError: make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Thu Jun 7 08:07:29 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 06:07:29 +0000 Subject: [Python-checkins] buildbot warnings in ppc Debian unstable trunk Message-ID: <20070607060729.B73EB1E4005@bag.python.org> The Buildbot has detected a new failure of ppc Debian unstable trunk. Full details are available at: http://www.python.org/dev/buildbot/all/ppc%2520Debian%2520unstable%2520trunk/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: brett.cannon,collin.winter,facundo.batista,georg.brandl,guido.van.rossum,hyeshik.chang,martin.v.loewis,neal.norwitz,thomas.heller Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 82, in run svr = svrcls(self.__addr, self.__hdlrcls) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/SocketServer.py", line 331, in __init__ self.server_bind() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/test/test_socketserver.py", line 163, in server_bind TCPServer.server_bind(self) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/SocketServer.py", line 342, in server_bind self.socket.bind(self.server_address) File "", line 1, in bind gaierror: (-2, 'Name or service not known') 3 tests failed: test_httplib test_socket_ssl test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Thu Jun 7 08:28:07 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 06:28:07 +0000 Subject: [Python-checkins] buildbot warnings in alpha Debian 2.5 Message-ID: <20070607062807.6C1EF1E4005@bag.python.org> The Buildbot has detected a new failure of alpha Debian 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/alpha%2520Debian%25202.5/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: brett.cannon,georg.brandl,hyeshik.chang,neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Thu Jun 7 15:23:25 2007 From: python-checkins at python.org (georg.brandl) Date: Thu, 7 Jun 2007 15:23:25 +0200 (CEST) Subject: [Python-checkins] r55802 - in python/trunk: Lib/test/test_compile.py Python/ast.c Message-ID: <20070607132325.7BD001E4007@bag.python.org> Author: georg.brandl Date: Thu Jun 7 15:23:24 2007 New Revision: 55802 Modified: python/trunk/Lib/test/test_compile.py python/trunk/Python/ast.c Log: Disallow function calls like foo(None=1). Backport from py3k rev. 55708 by Guido. Modified: python/trunk/Lib/test/test_compile.py ============================================================================== --- python/trunk/Lib/test/test_compile.py (original) +++ python/trunk/Lib/test/test_compile.py Thu Jun 7 15:23:24 2007 @@ -36,6 +36,9 @@ def test_syntax_error(self): self.assertRaises(SyntaxError, compile, "1+*3", "filename", "exec") + def test_none_keyword_arg(self): + self.assertRaises(SyntaxError, compile, "f(None=1)", "", "exec") + def test_duplicate_global_local(self): try: exec 'def f(a): global a; a = 1' Modified: python/trunk/Python/ast.c ============================================================================== --- python/trunk/Python/ast.c (original) +++ python/trunk/Python/ast.c Thu Jun 7 15:23:24 2007 @@ -1869,6 +1869,10 @@ return NULL; } key = e->v.Name.id; + if (!strcmp(PyString_AS_STRING(key), "None")) { + ast_error(CHILD(ch, 0), "assignment to None"); + return NULL; + } e = ast_for_expr(c, CHILD(ch, 2)); if (!e) return NULL; From python-checkins at python.org Thu Jun 7 15:23:29 2007 From: python-checkins at python.org (georg.brandl) Date: Thu, 7 Jun 2007 15:23:29 +0200 (CEST) Subject: [Python-checkins] r55803 - in python/branches/release25-maint: Lib/test/test_compile.py Python/ast.c Message-ID: <20070607132329.774731E4007@bag.python.org> Author: georg.brandl Date: Thu Jun 7 15:23:28 2007 New Revision: 55803 Modified: python/branches/release25-maint/Lib/test/test_compile.py python/branches/release25-maint/Python/ast.c Log: Disallow function calls like foo(None=1). Backport from py3k rev. 55708 by Guido. (backport from rev. 55802) Modified: python/branches/release25-maint/Lib/test/test_compile.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_compile.py (original) +++ python/branches/release25-maint/Lib/test/test_compile.py Thu Jun 7 15:23:28 2007 @@ -37,6 +37,9 @@ def test_syntax_error(self): self.assertRaises(SyntaxError, compile, "1+*3", "filename", "exec") + def test_none_keyword_arg(self): + self.assertRaises(SyntaxError, compile, "f(None=1)", "", "exec") + def test_duplicate_global_local(self): try: exec 'def f(a): global a; a = 1' Modified: python/branches/release25-maint/Python/ast.c ============================================================================== --- python/branches/release25-maint/Python/ast.c (original) +++ python/branches/release25-maint/Python/ast.c Thu Jun 7 15:23:28 2007 @@ -1855,13 +1855,18 @@ * then is very confusing. */ if (e->kind == Lambda_kind) { - ast_error(CHILD(ch, 0), "lambda cannot contain assignment"); - return NULL; + ast_error(CHILD(ch, 0), + "lambda cannot contain assignment"); + return NULL; } else if (e->kind != Name_kind) { - ast_error(CHILD(ch, 0), "keyword can't be an expression"); - return NULL; + ast_error(CHILD(ch, 0), "keyword can't be an expression"); + return NULL; } key = e->v.Name.id; + if (!strcmp(PyString_AS_STRING(key), "None")) { + ast_error(CHILD(ch, 0), "assignment to None"); + return NULL; + } e = ast_for_expr(c, CHILD(ch, 2)); if (!e) return NULL; From python-checkins at python.org Thu Jun 7 15:30:29 2007 From: python-checkins at python.org (georg.brandl) Date: Thu, 7 Jun 2007 15:30:29 +0200 (CEST) Subject: [Python-checkins] r55804 - python/trunk/Tools/scripts/reindent.py Message-ID: <20070607133029.BC3DE1E4006@bag.python.org> Author: georg.brandl Date: Thu Jun 7 15:30:24 2007 New Revision: 55804 Modified: python/trunk/Tools/scripts/reindent.py (props changed) Log: Make reindent.py executable. From python-checkins at python.org Thu Jun 7 15:34:14 2007 From: python-checkins at python.org (georg.brandl) Date: Thu, 7 Jun 2007 15:34:14 +0200 (CEST) Subject: [Python-checkins] r55805 - in python/trunk/Lib: test/test_urllib2_localnet.py urllib2.py Message-ID: <20070607133414.1E1141E4008@bag.python.org> Author: georg.brandl Date: Thu Jun 7 15:34:10 2007 New Revision: 55805 Added: python/trunk/Lib/test/test_urllib2_localnet.py Modified: python/trunk/Lib/urllib2.py Log: Patch #1667860: Fix UnboundLocalError in urllib2. Added: python/trunk/Lib/test/test_urllib2_localnet.py ============================================================================== --- (empty file) +++ python/trunk/Lib/test/test_urllib2_localnet.py Thu Jun 7 15:34:10 2007 @@ -0,0 +1,301 @@ +#!/usr/bin/env python + +import sys +import threading +import urlparse +import urllib2 +import BaseHTTPServer +import unittest +import hashlib +from test import test_support + +# Loopback http server infrastructure + +class LoopbackHttpServer(BaseHTTPServer.HTTPServer): + """HTTP server w/ a few modifications that make it useful for + loopback testing purposes. + """ + + def __init__(self, server_address, RequestHandlerClass): + BaseHTTPServer.HTTPServer.__init__(self, + server_address, + RequestHandlerClass) + + # Set the timeout of our listening socket really low so + # that we can stop the server easily. + self.socket.settimeout(1.0) + + def get_request(self): + """BaseHTTPServer method, overridden.""" + + request, client_address = self.socket.accept() + + # It's a loopback connection, so setting the timeout + # really low shouldn't affect anything, but should make + # deadlocks less likely to occur. + request.settimeout(10.0) + + return (request, client_address) + +class LoopbackHttpServerThread(threading.Thread): + """Stoppable thread that runs a loopback http server.""" + + def __init__(self, port, RequestHandlerClass): + threading.Thread.__init__(self) + self._RequestHandlerClass = RequestHandlerClass + self._stop = False + self._port = port + self._server_address = ('127.0.0.1', self._port) + self.ready = threading.Event() + + def stop(self): + """Stops the webserver if it's currently running.""" + + # Set the stop flag. + self._stop = True + + self.join() + + def run(self): + protocol = "HTTP/1.0" + + self._RequestHandlerClass.protocol_version = protocol + httpd = LoopbackHttpServer(self._server_address, + self._RequestHandlerClass) + + sa = httpd.socket.getsockname() + #print "Serving HTTP on", sa[0], "port", sa[1], "..." + + self.ready.set() + while not self._stop: + httpd.handle_request() + +# Authentication infrastructure + +class DigestAuthHandler: + """Handler for performing digest authentication.""" + + def __init__(self): + self._request_num = 0 + self._nonces = [] + self._users = {} + self._realm_name = "Test Realm" + self._qop = "auth" + + def set_qop(self, qop): + self._qop = qop + + def set_users(self, users): + assert isinstance(users, dict) + self._users = users + + def set_realm(self, realm): + self._realm_name = realm + + def _generate_nonce(self): + self._request_num += 1 + nonce = hashlib.md5(str(self._request_num)).hexdigest() + self._nonces.append(nonce) + return nonce + + def _create_auth_dict(self, auth_str): + first_space_index = auth_str.find(" ") + auth_str = auth_str[first_space_index+1:] + + parts = auth_str.split(",") + + auth_dict = {} + for part in parts: + name, value = part.split("=") + name = name.strip() + if value[0] == '"' and value[-1] == '"': + value = value[1:-1] + else: + value = value.strip() + auth_dict[name] = value + return auth_dict + + def _validate_auth(self, auth_dict, password, method, uri): + final_dict = {} + final_dict.update(auth_dict) + final_dict["password"] = password + final_dict["method"] = method + final_dict["uri"] = uri + HA1_str = "%(username)s:%(realm)s:%(password)s" % final_dict + HA1 = hashlib.md5(HA1_str).hexdigest() + HA2_str = "%(method)s:%(uri)s" % final_dict + HA2 = hashlib.md5(HA2_str).hexdigest() + final_dict["HA1"] = HA1 + final_dict["HA2"] = HA2 + response_str = "%(HA1)s:%(nonce)s:%(nc)s:" \ + "%(cnonce)s:%(qop)s:%(HA2)s" % final_dict + response = hashlib.md5(response_str).hexdigest() + + return response == auth_dict["response"] + + def _return_auth_challenge(self, request_handler): + request_handler.send_response(407, "Proxy Authentication Required") + request_handler.send_header("Content-Type", "text/html") + request_handler.send_header( + 'Proxy-Authenticate', 'Digest realm="%s", ' + 'qop="%s",' + 'nonce="%s", ' % \ + (self._realm_name, self._qop, self._generate_nonce())) + # XXX: Not sure if we're supposed to add this next header or + # not. + #request_handler.send_header('Connection', 'close') + request_handler.end_headers() + request_handler.wfile.write("Proxy Authentication Required.") + return False + + def handle_request(self, request_handler): + """Performs digest authentication on the given HTTP request + handler. Returns True if authentication was successful, False + otherwise. + + If no users have been set, then digest auth is effectively + disabled and this method will always return True. + """ + + if len(self._users) == 0: + return True + + if not request_handler.headers.has_key('Proxy-Authorization'): + return self._return_auth_challenge(request_handler) + else: + auth_dict = self._create_auth_dict( + request_handler.headers['Proxy-Authorization'] + ) + if self._users.has_key(auth_dict["username"]): + password = self._users[ auth_dict["username"] ] + else: + return self._return_auth_challenge(request_handler) + if not auth_dict.get("nonce") in self._nonces: + return self._return_auth_challenge(request_handler) + else: + self._nonces.remove(auth_dict["nonce"]) + + auth_validated = False + + # MSIE uses short_path in its validation, but Python's + # urllib2 uses the full path, so we're going to see if + # either of them works here. + + for path in [request_handler.path, request_handler.short_path]: + if self._validate_auth(auth_dict, + password, + request_handler.command, + path): + auth_validated = True + + if not auth_validated: + return self._return_auth_challenge(request_handler) + return True + +# Proxy test infrastructure + +class FakeProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): + """This is a 'fake proxy' that makes it look like the entire + internet has gone down due to a sudden zombie invasion. It main + utility is in providing us with authentication support for + testing. + """ + + digest_auth_handler = DigestAuthHandler() + + def log_message(self, format, *args): + # Uncomment the next line for debugging. + #sys.stderr.write(format % args) + pass + + def do_GET(self): + (scm, netloc, path, params, query, fragment) = urlparse.urlparse( + self.path, 'http') + self.short_path = path + if self.digest_auth_handler.handle_request(self): + self.send_response(200, "OK") + self.send_header("Content-Type", "text/html") + self.end_headers() + self.wfile.write("You've reached %s!
" % self.path) + self.wfile.write("Our apologies, but our server is down due to " + "a sudden zombie invasion.") + +# Test cases + +class ProxyAuthTests(unittest.TestCase): + URL = "http://www.foo.com" + + PORT = 8080 + USER = "tester" + PASSWD = "test123" + REALM = "TestRealm" + + PROXY_URL = "http://127.0.0.1:%d" % PORT + + def setUp(self): + FakeProxyHandler.digest_auth_handler.set_users({ + self.USER : self.PASSWD + }) + FakeProxyHandler.digest_auth_handler.set_realm(self.REALM) + + self.server = LoopbackHttpServerThread(self.PORT, FakeProxyHandler) + self.server.start() + self.server.ready.wait() + + handler = urllib2.ProxyHandler({"http" : self.PROXY_URL}) + self._digest_auth_handler = urllib2.ProxyDigestAuthHandler() + self.opener = urllib2.build_opener(handler, self._digest_auth_handler) + + def tearDown(self): + self.server.stop() + + def test_proxy_with_bad_password_raises_httperror(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD+"bad") + FakeProxyHandler.digest_auth_handler.set_qop("auth") + self.assertRaises(urllib2.HTTPError, + self.opener.open, + self.URL) + + def test_proxy_with_no_password_raises_httperror(self): + FakeProxyHandler.digest_auth_handler.set_qop("auth") + self.assertRaises(urllib2.HTTPError, + self.opener.open, + self.URL) + + def test_proxy_qop_auth_works(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD) + FakeProxyHandler.digest_auth_handler.set_qop("auth") + result = self.opener.open(self.URL) + while result.read(): + pass + result.close() + + def test_proxy_qop_auth_int_works_or_throws_urlerror(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD) + FakeProxyHandler.digest_auth_handler.set_qop("auth-int") + try: + result = self.opener.open(self.URL) + except urllib2.URLError: + # It's okay if we don't support auth-int, but we certainly + # shouldn't receive any kind of exception here other than + # a URLError. + result = None + if result: + while result.read(): + pass + result.close() + +def test_main(): + # We will NOT depend on the network resource flag + # (Lib/test/regrtest.py -u network) since all tests here are only + # localhost. However, if this is a bad rationale, then uncomment + # the next line. + #test_support.requires("network") + + test_support.run_unittest(ProxyAuthTests) + +if __name__ == "__main__": + test_main() Modified: python/trunk/Lib/urllib2.py ============================================================================== --- python/trunk/Lib/urllib2.py (original) +++ python/trunk/Lib/urllib2.py Thu Jun 7 15:34:10 2007 @@ -949,7 +949,7 @@ respdig = KD(H(A1), "%s:%s" % (nonce, H(A2))) else: # XXX handle auth-int. - pass + raise URLError("qop '%s' is not supported." % qop) # XXX should the partial digests be encoded too? From python-checkins at python.org Thu Jun 7 15:34:44 2007 From: python-checkins at python.org (georg.brandl) Date: Thu, 7 Jun 2007 15:34:44 +0200 (CEST) Subject: [Python-checkins] r55806 - in python/branches/release25-maint/Lib: test/test_urllib2_localnet.py urllib2.py Message-ID: <20070607133444.5ED431E4006@bag.python.org> Author: georg.brandl Date: Thu Jun 7 15:34:41 2007 New Revision: 55806 Added: python/branches/release25-maint/Lib/test/test_urllib2_localnet.py Modified: python/branches/release25-maint/Lib/urllib2.py Log: Patch #1667860: Fix UnboundLocalError in urllib2. (backport from rev. 55805) Added: python/branches/release25-maint/Lib/test/test_urllib2_localnet.py ============================================================================== --- (empty file) +++ python/branches/release25-maint/Lib/test/test_urllib2_localnet.py Thu Jun 7 15:34:41 2007 @@ -0,0 +1,301 @@ +#!/usr/bin/env python + +import sys +import threading +import urlparse +import urllib2 +import BaseHTTPServer +import unittest +import hashlib +from test import test_support + +# Loopback http server infrastructure + +class LoopbackHttpServer(BaseHTTPServer.HTTPServer): + """HTTP server w/ a few modifications that make it useful for + loopback testing purposes. + """ + + def __init__(self, server_address, RequestHandlerClass): + BaseHTTPServer.HTTPServer.__init__(self, + server_address, + RequestHandlerClass) + + # Set the timeout of our listening socket really low so + # that we can stop the server easily. + self.socket.settimeout(1.0) + + def get_request(self): + """BaseHTTPServer method, overridden.""" + + request, client_address = self.socket.accept() + + # It's a loopback connection, so setting the timeout + # really low shouldn't affect anything, but should make + # deadlocks less likely to occur. + request.settimeout(10.0) + + return (request, client_address) + +class LoopbackHttpServerThread(threading.Thread): + """Stoppable thread that runs a loopback http server.""" + + def __init__(self, port, RequestHandlerClass): + threading.Thread.__init__(self) + self._RequestHandlerClass = RequestHandlerClass + self._stop = False + self._port = port + self._server_address = ('127.0.0.1', self._port) + self.ready = threading.Event() + + def stop(self): + """Stops the webserver if it's currently running.""" + + # Set the stop flag. + self._stop = True + + self.join() + + def run(self): + protocol = "HTTP/1.0" + + self._RequestHandlerClass.protocol_version = protocol + httpd = LoopbackHttpServer(self._server_address, + self._RequestHandlerClass) + + sa = httpd.socket.getsockname() + #print "Serving HTTP on", sa[0], "port", sa[1], "..." + + self.ready.set() + while not self._stop: + httpd.handle_request() + +# Authentication infrastructure + +class DigestAuthHandler: + """Handler for performing digest authentication.""" + + def __init__(self): + self._request_num = 0 + self._nonces = [] + self._users = {} + self._realm_name = "Test Realm" + self._qop = "auth" + + def set_qop(self, qop): + self._qop = qop + + def set_users(self, users): + assert isinstance(users, dict) + self._users = users + + def set_realm(self, realm): + self._realm_name = realm + + def _generate_nonce(self): + self._request_num += 1 + nonce = hashlib.md5(str(self._request_num)).hexdigest() + self._nonces.append(nonce) + return nonce + + def _create_auth_dict(self, auth_str): + first_space_index = auth_str.find(" ") + auth_str = auth_str[first_space_index+1:] + + parts = auth_str.split(",") + + auth_dict = {} + for part in parts: + name, value = part.split("=") + name = name.strip() + if value[0] == '"' and value[-1] == '"': + value = value[1:-1] + else: + value = value.strip() + auth_dict[name] = value + return auth_dict + + def _validate_auth(self, auth_dict, password, method, uri): + final_dict = {} + final_dict.update(auth_dict) + final_dict["password"] = password + final_dict["method"] = method + final_dict["uri"] = uri + HA1_str = "%(username)s:%(realm)s:%(password)s" % final_dict + HA1 = hashlib.md5(HA1_str).hexdigest() + HA2_str = "%(method)s:%(uri)s" % final_dict + HA2 = hashlib.md5(HA2_str).hexdigest() + final_dict["HA1"] = HA1 + final_dict["HA2"] = HA2 + response_str = "%(HA1)s:%(nonce)s:%(nc)s:" \ + "%(cnonce)s:%(qop)s:%(HA2)s" % final_dict + response = hashlib.md5(response_str).hexdigest() + + return response == auth_dict["response"] + + def _return_auth_challenge(self, request_handler): + request_handler.send_response(407, "Proxy Authentication Required") + request_handler.send_header("Content-Type", "text/html") + request_handler.send_header( + 'Proxy-Authenticate', 'Digest realm="%s", ' + 'qop="%s",' + 'nonce="%s", ' % \ + (self._realm_name, self._qop, self._generate_nonce())) + # XXX: Not sure if we're supposed to add this next header or + # not. + #request_handler.send_header('Connection', 'close') + request_handler.end_headers() + request_handler.wfile.write("Proxy Authentication Required.") + return False + + def handle_request(self, request_handler): + """Performs digest authentication on the given HTTP request + handler. Returns True if authentication was successful, False + otherwise. + + If no users have been set, then digest auth is effectively + disabled and this method will always return True. + """ + + if len(self._users) == 0: + return True + + if not request_handler.headers.has_key('Proxy-Authorization'): + return self._return_auth_challenge(request_handler) + else: + auth_dict = self._create_auth_dict( + request_handler.headers['Proxy-Authorization'] + ) + if self._users.has_key(auth_dict["username"]): + password = self._users[ auth_dict["username"] ] + else: + return self._return_auth_challenge(request_handler) + if not auth_dict.get("nonce") in self._nonces: + return self._return_auth_challenge(request_handler) + else: + self._nonces.remove(auth_dict["nonce"]) + + auth_validated = False + + # MSIE uses short_path in its validation, but Python's + # urllib2 uses the full path, so we're going to see if + # either of them works here. + + for path in [request_handler.path, request_handler.short_path]: + if self._validate_auth(auth_dict, + password, + request_handler.command, + path): + auth_validated = True + + if not auth_validated: + return self._return_auth_challenge(request_handler) + return True + +# Proxy test infrastructure + +class FakeProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): + """This is a 'fake proxy' that makes it look like the entire + internet has gone down due to a sudden zombie invasion. It main + utility is in providing us with authentication support for + testing. + """ + + digest_auth_handler = DigestAuthHandler() + + def log_message(self, format, *args): + # Uncomment the next line for debugging. + #sys.stderr.write(format % args) + pass + + def do_GET(self): + (scm, netloc, path, params, query, fragment) = urlparse.urlparse( + self.path, 'http') + self.short_path = path + if self.digest_auth_handler.handle_request(self): + self.send_response(200, "OK") + self.send_header("Content-Type", "text/html") + self.end_headers() + self.wfile.write("You've reached %s!
" % self.path) + self.wfile.write("Our apologies, but our server is down due to " + "a sudden zombie invasion.") + +# Test cases + +class ProxyAuthTests(unittest.TestCase): + URL = "http://www.foo.com" + + PORT = 8080 + USER = "tester" + PASSWD = "test123" + REALM = "TestRealm" + + PROXY_URL = "http://127.0.0.1:%d" % PORT + + def setUp(self): + FakeProxyHandler.digest_auth_handler.set_users({ + self.USER : self.PASSWD + }) + FakeProxyHandler.digest_auth_handler.set_realm(self.REALM) + + self.server = LoopbackHttpServerThread(self.PORT, FakeProxyHandler) + self.server.start() + self.server.ready.wait() + + handler = urllib2.ProxyHandler({"http" : self.PROXY_URL}) + self._digest_auth_handler = urllib2.ProxyDigestAuthHandler() + self.opener = urllib2.build_opener(handler, self._digest_auth_handler) + + def tearDown(self): + self.server.stop() + + def test_proxy_with_bad_password_raises_httperror(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD+"bad") + FakeProxyHandler.digest_auth_handler.set_qop("auth") + self.assertRaises(urllib2.HTTPError, + self.opener.open, + self.URL) + + def test_proxy_with_no_password_raises_httperror(self): + FakeProxyHandler.digest_auth_handler.set_qop("auth") + self.assertRaises(urllib2.HTTPError, + self.opener.open, + self.URL) + + def test_proxy_qop_auth_works(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD) + FakeProxyHandler.digest_auth_handler.set_qop("auth") + result = self.opener.open(self.URL) + while result.read(): + pass + result.close() + + def test_proxy_qop_auth_int_works_or_throws_urlerror(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD) + FakeProxyHandler.digest_auth_handler.set_qop("auth-int") + try: + result = self.opener.open(self.URL) + except urllib2.URLError: + # It's okay if we don't support auth-int, but we certainly + # shouldn't receive any kind of exception here other than + # a URLError. + result = None + if result: + while result.read(): + pass + result.close() + +def test_main(): + # We will NOT depend on the network resource flag + # (Lib/test/regrtest.py -u network) since all tests here are only + # localhost. However, if this is a bad rationale, then uncomment + # the next line. + #test_support.requires("network") + + test_support.run_unittest(ProxyAuthTests) + +if __name__ == "__main__": + test_main() Modified: python/branches/release25-maint/Lib/urllib2.py ============================================================================== --- python/branches/release25-maint/Lib/urllib2.py (original) +++ python/branches/release25-maint/Lib/urllib2.py Thu Jun 7 15:34:41 2007 @@ -948,7 +948,7 @@ respdig = KD(H(A1), "%s:%s" % (nonce, H(A2))) else: # XXX handle auth-int. - pass + raise URLError("qop '%s' is not supported." % qop) # XXX should the partial digests be encoded too? From buildbot at python.org Thu Jun 7 16:39:02 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 14:39:02 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-3 2.5 Message-ID: <20070607143902.89E6F1E4006@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%25202.5/builds/9 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: georg.brandl Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_socket_ssl Traceback (most recent call last): File "../lib/test/regrtest.py", line 557, in runtest_inner indirect_test() File "C:\buildbot\work\2.5.heller-windows\build\lib\test\test_socket_ssl.py", line 131, in test_main test_timeout() File "C:\buildbot\work\2.5.heller-windows\build\lib\test\test_socket_ssl.py", line 63, in test_timeout s.connect(ADDR) File "", line 1, in connect error: (10060, 'Operation timed out') sincerely, -The Buildbot From buildbot at python.org Thu Jun 7 16:55:45 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 14:55:45 +0000 Subject: [Python-checkins] buildbot warnings in x86 mvlgcc trunk Message-ID: <20070607145545.798061E400F@bag.python.org> The Buildbot has detected a new failure of x86 mvlgcc trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520mvlgcc%2520trunk/builds/595 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: georg.brandl Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/test/test_urllib2_localnet.py", line 64, in run self._RequestHandlerClass) File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/test/test_urllib2_localnet.py", line 22, in __init__ RequestHandlerClass) File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/SocketServer.py", line 331, in __init__ self.server_bind() File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/BaseHTTPServer.py", line 101, in server_bind SocketServer.TCPServer.server_bind(self) File "/home2/buildbot/slave/trunk.loewis-linux/build/Lib/SocketServer.py", line 342, in server_bind self.socket.bind(self.server_address) File "", line 1, in bind error: (98, 'Address already in use') sincerely, -The Buildbot From buildbot at python.org Thu Jun 7 17:12:11 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 15:12:11 +0000 Subject: [Python-checkins] buildbot warnings in PPC64 Debian trunk Message-ID: <20070607151211.AB0C01E4006@bag.python.org> The Buildbot has detected a new failure of PPC64 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/PPC64%2520Debian%2520trunk/builds/2 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: georg.brandl Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Thu Jun 7 17:39:05 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 07 Jun 2007 15:39:05 +0000 Subject: [Python-checkins] buildbot warnings in x86 mvlgcc 2.5 Message-ID: <20070607153905.83EC21E4006@bag.python.org> The Buildbot has detected a new failure of x86 mvlgcc 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520mvlgcc%25202.5/builds/245 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: georg.brandl Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home2/buildbot/slave/2.5.loewis-linux/build/Lib/threading.py", line 460, in __bootstrap self.run() File "/home2/buildbot/slave/2.5.loewis-linux/build/Lib/test/test_urllib2_localnet.py", line 64, in run self._RequestHandlerClass) File "/home2/buildbot/slave/2.5.loewis-linux/build/Lib/test/test_urllib2_localnet.py", line 22, in __init__ RequestHandlerClass) File "/home2/buildbot/slave/2.5.loewis-linux/build/Lib/SocketServer.py", line 330, in __init__ self.server_bind() File "/home2/buildbot/slave/2.5.loewis-linux/build/Lib/BaseHTTPServer.py", line 101, in server_bind SocketServer.TCPServer.server_bind(self) File "/home2/buildbot/slave/2.5.loewis-linux/build/Lib/SocketServer.py", line 341, in server_bind self.socket.bind(self.server_address) File "", line 1, in bind error: (98, 'Address already in use') sincerely, -The Buildbot From python-checkins at python.org Thu Jun 7 22:21:16 2007 From: python-checkins at python.org (collin.winter) Date: Thu, 7 Jun 2007 22:21:16 +0200 (CEST) Subject: [Python-checkins] r55812 - peps/trunk/pep-3100.txt Message-ID: <20070607202116.2E2D31E4003@bag.python.org> Author: collin.winter Date: Thu Jun 7 22:21:11 2007 New Revision: 55812 Modified: peps/trunk/pep-3100.txt Log: Add StandardError to the kill list for Python 3. Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Thu Jun 7 22:21:11 2007 @@ -190,6 +190,8 @@ * ``intern()``: put in ``sys`` [2]_, [22]_ [done] * ``reduce()``: write a loop instead [2]_, [9]_ [done] * ``xrange()``: use ``range()`` instead [1]_ [See range() above] [done] +* ``StandardError``: this is a relic from the original exception hierachy; subclass + ``Exception`` instead. Standard library From nnorwitz at gmail.com Thu Jun 7 23:08:27 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 7 Jun 2007 17:08:27 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070607210827.GA26247@python.psfb.org> test_urllib2_localnet leaked [3, -8, 14] references, sum=9 From python-checkins at python.org Thu Jun 7 23:51:26 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Thu, 7 Jun 2007 23:51:26 +0200 (CEST) Subject: [Python-checkins] r55814 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070607215126.DC59C1E4003@bag.python.org> Author: alexandre.vassalotti Date: Thu Jun 7 23:51:21 2007 New Revision: 55814 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Update to reflect the new IO API. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Thu Jun 7 23:51:21 2007 @@ -113,6 +113,13 @@ return result; } +/* Generic getter for the writable, readable and seekable properties */ +static PyObject * +bytes_io_get_true(BytesIOObject *self) +{ + Py_RETURN_TRUE; +} + static PyObject * bytes_io_flush(BytesIOObject *self) { @@ -323,7 +330,7 @@ while (--position >= self->string_size) self->buf[position] = 0; - Py_RETURN_NONE; + return Py_BuildValue("n", self->pos); } static PyObject * @@ -492,12 +499,13 @@ "close() -> None. Close the file and release the resources held."); PyDoc_STRVAR(BytesIO_seek_doc, -"seek(offset[, whence]) -> None. Set the file's current position.\n" +"seek(pos, whence=0) -> int. Change stream position.\n" "\n" -"Argument offset is a byte count. Optional argument whence defaults to\n" -"0 (offset from start of file, offset should be >= 0); other values are 1\n" -"(move relative to current position, positive or negative), and 2 (move\n" -"relative to end of file, usually negative).\n"); +"Seek to byte offset pos relative to position indicated by whence:\n" +" 0 Start of stream (the default). pos should be >= 0;\n" +" 1 Current position - whence may be negative;\n" +" 2 End of stream - whence usually negative.\n" +"Returns the new absolute position."); PyDoc_STRVAR(BytesIO_write_doc, "write(str) -> None. Write string str to file."); @@ -510,8 +518,14 @@ static PyGetSetDef BytesIO_getsetlist[] = { - {"closed", (getter) bytes_io_get_closed, NULL, - "True if the file is closed"}, + {"closed", (getter) bytes_io_get_closed, NULL, + "True if the file is closed."}, + {"writeable", (getter) bytes_io_get_true, NULL, + "Always True."}, + {"readable", (getter) bytes_io_get_true, NULL, + "Always True."}, + {"seekable", (getter) bytes_io_get_true, NULL, + "Always True."}, {0}, /* sentinel */ }; Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Thu Jun 7 23:51:21 2007 @@ -116,6 +116,13 @@ return result; } +/* Generic getter for the writable, readable and seekable properties */ +static PyObject * +string_io_get_true(StringIOObject *self) +{ + Py_RETURN_TRUE; +} + static PyObject * string_io_flush(StringIOObject *self) { @@ -326,7 +333,7 @@ while (--position >= self->string_size) self->buf[position] = 0; - Py_RETURN_NONE; + return Py_BuildValue("n", self->pos); } static PyObject * @@ -502,12 +509,13 @@ "close() -> None. Close the file and release the resources held."); PyDoc_STRVAR(StringIO_seek_doc, -"seek(offset[, whence]) -> None. Set the file's current position.\n" +"seek(pos, whence=0) -> int. Change stream position.\n" "\n" -"Argument offset is a byte count. Optional argument whence defaults to\n" -"0 (offset from start of file, offset should be >= 0); other values are 1\n" -"(move relative to current position, positive or negative), and 2 (move\n" -"relative to end of file, usually negative).\n"); +"Seek to byte offset pos relative to position indicated by whence:\n" +" 0 Start of stream (the default). pos should be >= 0;\n" +" 1 Current position - whence may be negative;\n" +" 2 End of stream - whence usually negative.\n" +"Returns the new absolute position."); PyDoc_STRVAR(StringIO_write_doc, "write(str) -> None. Write string str to file."); @@ -522,6 +530,12 @@ static PyGetSetDef StringIO_getsetlist[] = { {"closed", (getter) string_io_get_closed, NULL, "True if the file is closed"}, + {"writeable", (getter) string_io_get_true, NULL, + "Always True."}, + {"readable", (getter) string_io_get_true, NULL, + "Always True."}, + {"seekable", (getter) string_io_get_true, NULL, + "Always True."}, {0}, /* sentinel */ }; From python-checkins at python.org Fri Jun 8 00:17:58 2007 From: python-checkins at python.org (guido.van.rossum) Date: Fri, 8 Jun 2007 00:17:58 +0200 (CEST) Subject: [Python-checkins] r55816 - peps/trunk/pep-0000.txt peps/trunk/pep-0344.txt peps/trunk/pep-0367.txt peps/trunk/pep-3134.txt peps/trunk/pep-3135.txt Message-ID: <20070607221758.4E83C1E4003@bag.python.org> Author: guido.van.rossum Date: Fri Jun 8 00:17:56 2007 New Revision: 55816 Added: peps/trunk/pep-3134.txt (contents, props changed) peps/trunk/pep-3135.txt (contents, props changed) Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0344.txt peps/trunk/pep-0367.txt Log: Renumber 344 -> 3134 and 367 -> 3135. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Fri Jun 8 00:17:56 2007 @@ -91,18 +91,18 @@ S 286 Enhanced Argument Tuples von Loewis S 335 Overloadable Boolean Operators Ewing S 337 Logging Usage in the Standard Library Dubner - S 344 Exception Chaining and Embedded Tracebacks Yee S 345 Metadata for Python Software Packages 1.2 Jones S 362 Function Signature Object Cannon, Seo S 364 Transitioning to the Py3K Standard Library Warsaw S 365 Adding the pkg_resources module Eby S 366 Main module explicit relative imports Coghlan - S 367 New Super Spealman S 3101 Advanced String Formatting Talin S 3108 Standard Library Reorganization Cannon S 3116 New I/O Stutzbach, Verdone, GvR S 3118 Revising the buffer protocol Oliphant, Banks S 3124 Overloading, Generic Functions, Interfaces Eby + S 3134 Exception Chaining and Embedded Tracebacks Yee + S 3135 New Super Spealman, Delaney S 3141 A Type Hierarchy for Numbers Yasskin Finished PEPs (done, implemented in Subversion) @@ -251,6 +251,7 @@ SW 334 Simple Coroutines via SuspendIteration Evans SR 336 Make None Callable McClelland SR 340 Anonymous Block Statements GvR + SR 344 Exception Chaining and Embedded Tracebacks Yee SW 346 User Defined ("with") Statements Coghlan SR 348 Exception Reorganization for Python 3.0 Cannon SD 349 Allow str() to return unicode strings Schemenauer @@ -260,6 +261,7 @@ SR 355 Path - Object oriented filesystem paths Lindqvist SW 359 The "make" Statement Bethard SR 363 Syntax For Dynamic Attribute Access North + SR 367 New Super Spealman, Delaney SR 666 Reject Foolish Indentation Creighton SR 754 IEEE 754 Floating Point Special Values Warnes SR 3103 A Switch/Case Statement GvR @@ -440,7 +442,7 @@ SF 341 Unifying try-except and try-finally Brandl SF 342 Coroutines via Enhanced Generators GvR, Eby SF 343 Anonymous Block Redux and Generator Enhancements GvR - S 344 Exception Chaining and Embedded Tracebacks Yee + SR 344 Exception Chaining and Embedded Tracebacks Yee S 345 Metadata for Python Software Packages 1.2 Jones SW 346 User Defined ("with") Statements Coghlan PA 347 Migrating the Python CVS to Subversion von L?wis @@ -463,7 +465,7 @@ S 364 Transitioning to the Py3K Standard Library Warsaw S 365 Adding the pkg_resources module Eby S 366 Main module explicit relative imports Coghlan - S 367 New Super Spealman + SR 367 New Super Spealman, Delaney SR 666 Reject Foolish Indentation Creighton SR 754 IEEE 754 Floating Point Special Values Warnes P 3000 Python 3000 GvR @@ -504,6 +506,8 @@ SA 3131 Supporting Non-ASCII Identifiers von L?wis SF 3132 Extended Iterable Unpacking Brandl SR 3133 Introducing Roles Winter + S 3134 Exception Chaining and Embedded Tracebacks Yee + S 3135 New Super Spealman, Delaney S 3141 A Type Hierarchy for Numbers Yasskin @@ -544,6 +548,7 @@ Cole, Dave djc at object-craft.com.au Craig, Christopher python-pep at ccraig.org Creighton, Laura lac at strakt.com + Delaney, Tim timothy.c.delaney at gmail.com D?rwald, Walter Drake, Fred fdrake at acm.org Dubner, Michael P. dubnerm at mindless.com Modified: peps/trunk/pep-0344.txt ============================================================================== --- peps/trunk/pep-0344.txt (original) +++ peps/trunk/pep-0344.txt Fri Jun 8 00:17:56 2007 @@ -3,13 +3,19 @@ Version: $Revision$ Last-Modified: $Date$ Author: Ka-Ping Yee -Status: Active +Status: Replaced Type: Standards Track Content-Type: text/plain Created: 12-May-2005 Python-Version: 2.5 +Numbering Note + + This PEP has been renumbered to PEP 3134. The text below is the + last version submitted under the old number. + + Abstract This PEP proposes three standard attributes on exception instances: Modified: peps/trunk/pep-0367.txt ============================================================================== --- peps/trunk/pep-0367.txt (original) +++ peps/trunk/pep-0367.txt Fri Jun 8 00:17:56 2007 @@ -4,13 +4,19 @@ Last-Modified: $Date$ Author: Calvin Spealman , Tim Delaney -Status: Draft +Status: Replaced Type: Standards Track Content-Type: text/x-rst Created: 28-Apr-2007 Python-Version: 2.6 Post-History: 28-Apr-2007, 29-Apr-2007 (1), 29-Apr-2007 (2), 14-May-2007 +Numbering Note +============== + +This PEP has been renumbered to PEP 3135. The text below is the last +version submitted under the old number. + Abstract ======== Added: peps/trunk/pep-3134.txt ============================================================================== --- (empty file) +++ peps/trunk/pep-3134.txt Fri Jun 8 00:17:56 2007 @@ -0,0 +1,544 @@ +PEP: 3134 +Title: Exception Chaining and Embedded Tracebacks +Version: $Revision$ +Last-Modified: $Date$ +Author: Ka-Ping Yee +Status: Active +Type: Standards Track +Content-Type: text/plain +Created: 12-May-2005 +Python-Version: 3.0 + + +Numbering Note + + This PEP started its life as PEP 344. Since it is now targeted + for Python 3000, it has been moved into the 3xxx space. + + +Abstract + + This PEP proposes three standard attributes on exception instances: + the '__context__' attribute for implicitly chained exceptions, the + '__cause__' attribute for explicitly chained exceptions, and the + '__traceback__' attribute for the traceback. A new "raise ... from" + statement sets the '__cause__' attribute. + + +Motivation + + During the handling of one exception (exception A), it is possible + that another exception (exception B) may occur. In today's Python + (version 2.4), if this happens, exception B is propagated outward + and exception A is lost. In order to debug the problem, it is + useful to know about both exceptions. The '__context__' attribute + retains this information automatically. + + Sometimes it can be useful for an exception handler to intentionally + re-raise an exception, either to provide extra information or to + translate an exception to another type. The '__cause__' attribute + provides an explicit way to record the direct cause of an exception. + + In today's Python implementation, exceptions are composed of three + parts: the type, the value, and the traceback. The 'sys' module, + exposes the current exception in three parallel variables, exc_type, + exc_value, and exc_traceback, the sys.exc_info() function returns a + tuple of these three parts, and the 'raise' statement has a + three-argument form accepting these three parts. Manipulating + exceptions often requires passing these three things in parallel, + which can be tedious and error-prone. Additionally, the 'except' + statement can only provide access to the value, not the traceback. + Adding the '__traceback__' attribute to exception values makes all + the exception information accessible from a single place. + + +History + + Raymond Hettinger [1] raised the issue of masked exceptions on + Python-Dev in January 2003 and proposed a PyErr_FormatAppend() + function that C modules could use to augment the currently active + exception with more information. Brett Cannon [2] brought up + chained exceptions again in June 2003, prompting a long discussion. + + Greg Ewing [3] identified the case of an exception occuring in a + 'finally' block during unwinding triggered by an original exception, + as distinct from the case of an exception occuring in an 'except' + block that is handling the original exception. + + Greg Ewing [4] and Guido van Rossum [5], and probably others, have + previously mentioned adding a traceback attribute to Exception + instances. This is noted in PEP 3000. + + This PEP was motivated by yet another recent Python-Dev reposting + of the same ideas [6] [7]. + + +Rationale + + The Python-Dev discussions revealed interest in exception chaining + for two quite different purposes. To handle the unexpected raising + of a secondary exception, the exception must be retained implicitly. + To support intentional translation of an exception, there must be a + way to chain exceptions explicitly. This PEP addresses both. + + Several attribute names for chained exceptions have been suggested + on Python-Dev [2], including 'cause', 'antecedent', 'reason', + 'original', 'chain', 'chainedexc', 'exc_chain', 'excprev', + 'previous', and 'precursor'. For an explicitly chained exception, + this PEP suggests '__cause__' because of its specific meaning. For + an implicitly chained exception, this PEP proposes the name + '__context__' because the intended meaning is more specific than + temporal precedence but less specific than causation: an exception + occurs in the context of handling another exception. + + This PEP suggests names with leading and trailing double-underscores + for these three attributes because they are set by the Python VM. + Only in very special cases should they be set by normal assignment. + + This PEP handles exceptions that occur during 'except' blocks and + 'finally' blocks in the same way. Reading the traceback makes it + clear where the exceptions occurred, so additional mechanisms for + distinguishing the two cases would only add unnecessary complexity. + + This PEP proposes that the outermost exception object (the one + exposed for matching by 'except' clauses) be the most recently + raised exception for compatibility with current behaviour. + + This PEP proposes that tracebacks display the outermost exception + last, because this would be consistent with the chronological order + of tracebacks (from oldest to most recent frame) and because the + actual thrown exception is easier to find on the last line. + + To keep things simpler, the C API calls for setting an exception + will not automatically set the exception's '__context__'. Guido + van Rossum has has expressed concerns with making such changes [8]. + + As for other languages, Java and Ruby both discard the original + exception when another exception occurs in a 'catch'/'rescue' or + 'finally'/'ensure' clause. Perl 5 lacks built-in structured + exception handling. For Perl 6, RFC 88 [9] proposes an exception + mechanism that implicitly retains chained exceptions in an array + named @@. In that RFC, the most recently raised exception is + exposed for matching, as in this PEP; also, arbitrary expressions + (possibly involving @@) can be evaluated for exception matching. + + Exceptions in C# contain a read-only 'InnerException' property that + may point to another exception. Its documentation [10] says that + "When an exception X is thrown as a direct result of a previous + exception Y, the InnerException property of X should contain a + reference to Y." This property is not set by the VM automatically; + rather, all exception constructors take an optional 'innerException' + argument to set it explicitly. The '__cause__' attribute fulfills + the same purpose as InnerException, but this PEP proposes a new form + of 'raise' rather than extending the constructors of all exceptions. + C# also provides a GetBaseException method that jumps directly to + the end of the InnerException chain; this PEP proposes no analog. + + The reason all three of these attributes are presented together in + one proposal is that the '__traceback__' attribute provides + convenient access to the traceback on chained exceptions. + + +Implicit Exception Chaining + + Here is an example to illustrate the '__context__' attribute. + + def compute(a, b): + try: + a/b + except Exception, exc: + log(exc) + + def log(exc): + file = open('logfile.txt') # oops, forgot the 'w' + print >>file, exc + file.close() + + Calling compute(0, 0) causes a ZeroDivisionError. The compute() + function catches this exception and calls log(exc), but the log() + function also raises an exception when it tries to write to a + file that wasn't opened for writing. + + In today's Python, the caller of compute() gets thrown an IOError. + The ZeroDivisionError is lost. With the proposed change, the + instance of IOError has an additional '__context__' attribute that + retains the ZeroDivisionError. + + The following more elaborate example demonstrates the handling of a + mixture of 'finally' and 'except' clauses: + + def main(filename): + file = open(filename) # oops, forgot the 'w' + try: + try: + compute() + except Exception, exc: + log(file, exc) + finally: + file.clos() # oops, misspelled 'close' + + def compute(): + 1/0 + + def log(file, exc): + try: + print >>file, exc # oops, file is not writable + except: + display(exc) + + def display(exc): + print ex # oops, misspelled 'exc' + + Calling main() with the name of an existing file will trigger four + exceptions. The ultimate result will be an AttributeError due to + the misspelling of 'clos', whose __context__ points to a NameError + due to the misspelling of 'ex', whose __context__ points to an + IOError due to the file being read-only, whose __context__ points to + a ZeroDivisionError, whose __context__ attribute is None. + + The proposed semantics are as follows: + + 1. Each thread has an exception context initially set to None. + + 2. Whenever an exception is raised, if the exception instance does + not already have a '__context__' attribute, the interpreter sets + it equal to the thread's exception context. + + 3. Immediately after an exception is raised, the thread's exception + context is set to the exception. + + 4. Whenever the interpreter exits an 'except' block by reaching the + end or executing a 'return', 'yield', 'continue', or 'break' + statement, the thread's exception context is set to None. + + +Explicit Exception Chaining + + The '__cause__' attribute on exception objects is always initialized + to None. It is set by a new form of the 'raise' statement: + + raise EXCEPTION from CAUSE + + which is equivalent to: + + exc = EXCEPTION + exc.__cause__ = CAUSE + raise exc + + In the following example, a database provides implementations for a + few different kinds of storage, with file storage as one kind. The + database designer wants errors to propagate as DatabaseError objects + so that the client doesn't have to be aware of the storage-specific + details, but doesn't want to lose the underlying error information. + + class DatabaseError(StandardError): + pass + + class FileDatabase(Database): + def __init__(self, filename): + try: + self.file = open(filename) + except IOError, exc: + raise DatabaseError('failed to open') from exc + + If the call to open() raises an exception, the problem will be + reported as a DatabaseError, with a __cause__ attribute that reveals + the IOError as the original cause. + + +Traceback Attribute + + The following example illustrates the '__traceback__' attribute. + + def do_logged(file, work): + try: + work() + except Exception, exc: + write_exception(file, exc) + raise exc + + from traceback import format_tb + + def write_exception(file, exc): + ... + type = exc.__class__ + message = str(exc) + lines = format_tb(exc.__traceback__) + file.write(... type ... message ... lines ...) + ... + + In today's Python, the do_logged() function would have to extract + the traceback from sys.exc_traceback or sys.exc_info()[2] and pass + both the value and the traceback to write_exception(). With the + proposed change, write_exception() simply gets one argument and + obtains the exception using the '__traceback__' attribute. + + The proposed semantics are as follows: + + 1. Whenever an exception is caught, if the exception instance does + not already have a '__traceback__' attribute, the interpreter + sets it to the newly caught traceback. + + +Enhanced Reporting + + The default exception handler will be modified to report chained + exceptions. The chain of exceptions is traversed by following the + '__cause__' and '__context__' attributes, with '__cause__' taking + priority. In keeping with the chronological order of tracebacks, + the most recently raised exception is displayed last; that is, the + display begins with the description of the innermost exception and + backs up the chain to the outermost exception. The tracebacks are + formatted as usual, with one of the lines: + + The above exception was the direct cause of the following exception: + + or + + During handling of the above exception, another exception occurred: + + between tracebacks, depending whether they are linked by __cause__ + or __context__ respectively. Here is a sketch of the procedure: + + def print_chain(exc): + if exc.__cause__: + print_chain(exc.__cause__) + print '\nThe above exception was the direct cause...' + elif exc.__context__: + print_chain(exc.__context__) + print '\nDuring handling of the above exception, ...' + print_exc(exc) + + In the 'traceback' module, the format_exception, print_exception, + print_exc, and print_last functions will be updated to accept an + optional 'chain' argument, True by default. When this argument is + True, these functions will format or display the entire chain of + exceptions as just described. When it is False, these functions + will format or display only the outermost exception. + + The 'cgitb' module should also be updated to display the entire + chain of exceptions. + + +C API + + The PyErr_Set* calls for setting exceptions will not set the + '__context__' attribute on exceptions. PyErr_NormalizeException + will always set the 'traceback' attribute to its 'tb' argument and + the '__context__' and '__cause__' attributes to None. + + A new API function, PyErr_SetContext(context), will help C + programmers provide chained exception information. This function + will first normalize the current exception so it is an instance, + then set its '__context__' attribute. A similar API function, + PyErr_SetCause(cause), will set the '__cause__' attribute. + + +Compatibility + + Chained exceptions expose the type of the most recent exception, so + they will still match the same 'except' clauses as they do now. + + The proposed changes should not break any code unless it sets or + uses attributes named '__context__', '__cause__', or '__traceback__' + on exception instances. As of 2005-05-12, the Python standard + library contains no mention of such attributes. + + +Open Issue: Extra Information + + Walter D?rwald [11] expressed a desire to attach extra information + to an exception during its upward propagation without changing its + type. This could be a useful feature, but it is not addressed by + this PEP. It could conceivably be addressed by a separate PEP + establishing conventions for other informational attributes on + exceptions. + + +Open Issue: Suppressing Context + + As written, this PEP makes it impossible to suppress '__context__', + since setting exc.__context__ to None in an 'except' or 'finally' + clause will only result in it being set again when exc is raised. + + +Open Issue: Limiting Exception Types + + To improve encapsulation, library implementors may want to wrap all + implementation-level exceptions with an application-level exception. + One could try to wrap exceptions by writing this: + + try: + ... implementation may raise an exception ... + except: + import sys + raise ApplicationError from sys.exc_value + + or this: + + try: + ... implementation may raise an exception ... + except Exception, exc: + raise ApplicationError from exc + + but both are somewhat flawed. It would be nice to be able to name + the current exception in a catch-all 'except' clause, but that isn't + addressed here. Such a feature would allow something like this: + + try: + ... implementation may raise an exception ... + except *, exc: + raise ApplicationError from exc + + +Open Issue: yield + + The exception context is lost when a 'yield' statement is executed; + resuming the frame after the 'yield' does not restore the context. + Addressing this problem is out of the scope of this PEP; it is not a + new problem, as demonstrated by the following example: + + >>> def gen(): + ... try: + ... 1/0 + ... except: + ... yield 3 + ... raise + ... + >>> g = gen() + >>> g.next() + 3 + >>> g.next() + TypeError: exceptions must be classes, instances, or strings + (deprecated), not NoneType + + +Open Issue: Garbage Collection + + The strongest objection to this proposal has been that it creates + cycles between exceptions and stack frames [12]. Collection of + cyclic garbage (and therefore resource release) can be greatly + delayed. + + >>> try: + >>> 1/0 + >>> except Exception, err: + >>> pass + + will introduce a cycle from err -> traceback -> stack frame -> err, + keeping all locals in the same scope alive until the next GC happens. + + Today, these locals would go out of scope. There is lots of code + which assumes that "local" resources -- particularly open files -- will + be closed quickly. If closure has to wait for the next GC, a program + (which runs fine today) may run out of file handles. + + Making the __traceback__ attribute a weak reference would avoid the + problems with cyclic garbage. Unfortunately, it would make saving + the Exception for later (as unittest does) more awkward, and it would + not allow as much cleanup of the sys module. + + A possible alternate solution, suggested by Adam Olsen, would be to + instead turn the reference from the stack frame to the 'err' variable + into a weak reference when the variable goes out of scope [13]. + + +Possible Future Compatible Changes + + These changes are consistent with the appearance of exceptions as + a single object rather than a triple at the interpreter level. + + - If PEP 340 or PEP 343 is accepted, replace the three (type, value, + traceback) arguments to __exit__ with a single exception argument. + + - Deprecate sys.exc_type, sys.exc_value, sys.exc_traceback, and + sys.exc_info() in favour of a single member, sys.exception. + + - Deprecate sys.last_type, sys.last_value, and sys.last_traceback + in favour of a single member, sys.last_exception. + + - Deprecate the three-argument form of the 'raise' statement in + favour of the one-argument form. + + - Upgrade cgitb.html() to accept a single value as its first + argument as an alternative to a (type, value, traceback) tuple. + + +Possible Future Incompatible Changes + + These changes might be worth considering for Python 3000. + + - Remove sys.exc_type, sys.exc_value, sys.exc_traceback, and + sys.exc_info(). + + - Remove sys.last_type, sys.last_value, and sys.last_traceback. + + - Replace the three-argument sys.excepthook with a one-argument + API, and changing the 'cgitb' module to match. + + - Remove the three-argument form of the 'raise' statement. + + - Upgrade traceback.print_exception to accept an 'exception' + argument instead of the type, value, and traceback arguments. + + +Acknowledgements + + Brett Cannon, Greg Ewing, Guido van Rossum, Jeremy Hylton, Phillip + J. Eby, Raymond Hettinger, Walter D?rwald, and others. + + +References + + [1] Raymond Hettinger, "Idea for avoiding exception masking" + http://mail.python.org/pipermail/python-dev/2003-January/032492.html + + [2] Brett Cannon explains chained exceptions + http://mail.python.org/pipermail/python-dev/2003-June/036063.html + + [3] Greg Ewing points out masking caused by exceptions during finally + http://mail.python.org/pipermail/python-dev/2003-June/036290.html + + [4] Greg Ewing suggests storing the traceback in the exception object + http://mail.python.org/pipermail/python-dev/2003-June/036092.html + + [5] Guido van Rossum mentions exceptions having a traceback attribute + http://mail.python.org/pipermail/python-dev/2005-April/053060.html + + [6] Ka-Ping Yee, "Tidier Exceptions" + http://mail.python.org/pipermail/python-dev/2005-May/053671.html + + [7] Ka-Ping Yee, "Chained Exceptions" + http://mail.python.org/pipermail/python-dev/2005-May/053672.html + + [8] Guido van Rossum discusses automatic chaining in PyErr_Set* + http://mail.python.org/pipermail/python-dev/2003-June/036180.html + + [9] Tony Olensky, "Omnibus Structured Exception/Error Handling Mechanism" + http://dev.perl.org/perl6/rfc/88.html + + [10] MSDN .NET Framework Library, "Exception.InnerException Property" + http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemexceptionclassinnerexceptiontopic.asp + + [11] Walter D?rwald suggests wrapping exceptions to add details + http://mail.python.org/pipermail/python-dev/2003-June/036148.html + + [12] Guido van Rossum restates the objection to cyclic trash + http://mail.python.org/pipermail/python-3000/2007-January/005322.html + + [13] Adam Olsen suggests using a weakref from stack frame to exception + http://mail.python.org/pipermail/python-3000/2007-January/005363.html + + +Copyright + + This document has been placed in the public domain. + + +Local Variables: +mode: indented-text +indent-tabs-mode: nil +sentence-end-double-space: t +fill-column: 70 +coding: utf-8 +End: Added: peps/trunk/pep-3135.txt ============================================================================== --- (empty file) +++ peps/trunk/pep-3135.txt Fri Jun 8 00:17:56 2007 @@ -0,0 +1,591 @@ +PEP: 3135 +Title: New Super +Version: $Revision$ +Last-Modified: $Date$ +Author: Calvin Spealman , + Tim Delaney +Status: Draft +Type: Standards Track +Content-Type: text/x-rst +Created: 28-Apr-2007 +Python-Version: 3.0 +Post-History: 28-Apr-2007, 29-Apr-2007 (1), 29-Apr-2007 (2), 14-May-2007 + +Numbering Note +============== + +This PEP started its life as PEP 367. Since it is now targeted +for Python 3000, it has been moved into the 3xxx space. + +Abstract +======== + +This PEP proposes syntactic sugar for use of the ``super`` type to automatically +construct instances of the super type binding to the class that a method was +defined in, and the instance (or class object for classmethods) that the method +is currently acting upon. + +The premise of the new super usage suggested is as follows:: + + super.foo(1, 2) + +to replace the old:: + + super(Foo, self).foo(1, 2) + +and the current ``__builtin__.super`` be aliased to ``__builtin__.__super__`` +(with ``__builtin__.super`` to be removed in Python 3.0). + +It is further proposed that assignment to ``super`` become a ``SyntaxError``, +similar to the behaviour of ``None``. + + +Rationale +========= + +The current usage of super requires an explicit passing of both the class and +instance it must operate from, requiring a breaking of the DRY (Don't Repeat +Yourself) rule. This hinders any change in class name, and is often considered +a wart by many. + + +Specification +============= + +Within the specification section, some special terminology will be used to +distinguish similar and closely related concepts. "super type" will refer to +the actual builtin type named "super". A "super instance" is simply an instance +of the super type, which is associated with a class and possibly with an +instance of that class. + +Because the new ``super`` semantics are not backwards compatible with Python +2.5, the new semantics will require a ``__future__`` import:: + + from __future__ import new_super + +The current ``__builtin__.super`` will be aliased to ``__builtin__.__super__``. +This will occur regardless of whether the new ``super`` semantics are active. +It is not possible to simply rename ``__builtin__.super``, as that would affect +modules that do not use the new ``super`` semantics. In Python 3.0 it is +proposed that the name ``__builtin__.super`` will be removed. + +Replacing the old usage of super, calls to the next class in the MRO (method +resolution order) can be made without explicitly creating a ``super`` +instance (although doing so will still be supported via ``__super__``). Every +function will have an implicit local named ``super``. This name behaves +identically to a normal local, including use by inner functions via a cell, +with the following exceptions: + +1. Assigning to the name ``super`` will raise a ``SyntaxError`` at compile time; + +2. Calling a static method or normal function that accesses the name ``super`` + will raise a ``TypeError`` at runtime. + +Every function that uses the name ``super``, or has an inner function that +uses the name ``super``, will include a preamble that performs the equivalent +of:: + + super = __builtin__.__super__(, ) + +where ```` is the class that the method was defined in, and +```` is the first parameter of the method (normally ``self`` for +instance methods, and ``cls`` for class methods). For static methods and normal +functions, ```` will be ``None``, resulting in a ``TypeError`` being +raised during the preamble. + +Note: The relationship between ``super`` and ``__super__`` is similar to that +between ``import`` and ``__import__``. + +Much of this was discussed in the thread of the python-dev list, "Fixing super +anyone?" [1]_. + + +Open Issues +----------- + + +Determining the class object to use +''''''''''''''''''''''''''''''''''' + +The exact mechanism for associating the method with the defining class is not +specified in this PEP, and should be chosen for maximum performance. For +CPython, it is suggested that the class instance be held in a C-level variable +on the function object which is bound to one of ``NULL`` (not part of a class), +``Py_None`` (static method) or a class object (instance or class method). + + +Should ``super`` actually become a keyword? +''''''''''''''''''''''''''''''''''''''''''' + +With this proposal, ``super`` would become a keyword to the same extent that +``None`` is a keyword. It is possible that further restricting the ``super`` +name may simplify implementation, however some are against the actual keyword- +ization of super. The simplest solution is often the correct solution and the +simplest solution may well not be adding additional keywords to the language +when they are not needed. Still, it may solve other open issues. + + +Closed Issues +------------- + +super used with __call__ attributes +''''''''''''''''''''''''''''''''''' + +It was considered that it might be a problem that instantiating super instances +the classic way, because calling it would lookup the __call__ attribute and +thus try to perform an automatic super lookup to the next class in the MRO. +However, this was found to be false, because calling an object only looks up +the __call__ method directly on the object's type. The following example shows +this in action. + +:: + + class A(object): + def __call__(self): + return '__call__' + def __getattribute__(self, attr): + if attr == '__call__': + return lambda: '__getattribute__' + a = A() + assert a() == '__call__' + assert a.__call__() == '__getattribute__' + +In any case, with the renaming of ``__builtin__.super`` to +``__builtin__.__super__`` this issue goes away entirely. + + +Reference Implementation +======================== + +It is impossible to implement the above specification entirely in Python. This +reference implementation has the following differences to the specification: + +1. New ``super`` semantics are implemented using bytecode hacking. + +2. Assignment to ``super`` is not a ``SyntaxError``. Also see point #4. + +3. Classes must either use the metaclass ``autosuper_meta`` or inherit from + the base class ``autosuper`` to acquire the new ``super`` semantics. + +4. ``super`` is not an implicit local variable. In particular, for inner + functions to be able to use the super instance, there must be an assignment + of the form ``super = super`` in the method. + +The reference implementation assumes that it is being run on Python 2.5+. + +:: + + #!/usr/bin/env python + # + # autosuper.py + + from array import array + import dis + import new + import types + import __builtin__ + __builtin__.__super__ = __builtin__.super + del __builtin__.super + + # We need these for modifying bytecode + from opcode import opmap, HAVE_ARGUMENT, EXTENDED_ARG + + LOAD_GLOBAL = opmap['LOAD_GLOBAL'] + LOAD_NAME = opmap['LOAD_NAME'] + LOAD_CONST = opmap['LOAD_CONST'] + LOAD_FAST = opmap['LOAD_FAST'] + LOAD_ATTR = opmap['LOAD_ATTR'] + STORE_FAST = opmap['STORE_FAST'] + LOAD_DEREF = opmap['LOAD_DEREF'] + STORE_DEREF = opmap['STORE_DEREF'] + CALL_FUNCTION = opmap['CALL_FUNCTION'] + STORE_GLOBAL = opmap['STORE_GLOBAL'] + DUP_TOP = opmap['DUP_TOP'] + POP_TOP = opmap['POP_TOP'] + NOP = opmap['NOP'] + JUMP_FORWARD = opmap['JUMP_FORWARD'] + ABSOLUTE_TARGET = dis.hasjabs + + def _oparg(code, opcode_pos): + return code[opcode_pos+1] + (code[opcode_pos+2] << 8) + + def _bind_autosuper(func, cls): + co = func.func_code + name = func.func_name + newcode = array('B', co.co_code) + codelen = len(newcode) + newconsts = list(co.co_consts) + newvarnames = list(co.co_varnames) + + # Check if the global 'super' keyword is already present + try: + sn_pos = list(co.co_names).index('super') + except ValueError: + sn_pos = None + + # Check if the varname 'super' keyword is already present + try: + sv_pos = newvarnames.index('super') + except ValueError: + sv_pos = None + + # Check if the callvar 'super' keyword is already present + try: + sc_pos = list(co.co_cellvars).index('super') + except ValueError: + sc_pos = None + + # If 'super' isn't used anywhere in the function, we don't have anything to do + if sn_pos is None and sv_pos is None and sc_pos is None: + return func + + c_pos = None + s_pos = None + n_pos = None + + # Check if the 'cls_name' and 'super' objects are already in the constants + for pos, o in enumerate(newconsts): + if o is cls: + c_pos = pos + + if o is __super__: + s_pos = pos + + if o == name: + n_pos = pos + + # Add in any missing objects to constants and varnames + if c_pos is None: + c_pos = len(newconsts) + newconsts.append(cls) + + if n_pos is None: + n_pos = len(newconsts) + newconsts.append(name) + + if s_pos is None: + s_pos = len(newconsts) + newconsts.append(__super__) + + if sv_pos is None: + sv_pos = len(newvarnames) + newvarnames.append('super') + + # This goes at the start of the function. It is: + # + # super = __super__(cls, self) + # + # If 'super' is a cell variable, we store to both the + # local and cell variables (i.e. STORE_FAST and STORE_DEREF). + # + preamble = [ + LOAD_CONST, s_pos & 0xFF, s_pos >> 8, + LOAD_CONST, c_pos & 0xFF, c_pos >> 8, + LOAD_FAST, 0, 0, + CALL_FUNCTION, 2, 0, + ] + + if sc_pos is None: + # 'super' is not a cell variable - we can just use the local variable + preamble += [ + STORE_FAST, sv_pos & 0xFF, sv_pos >> 8, + ] + else: + # If 'super' is a cell variable, we need to handle LOAD_DEREF. + preamble += [ + DUP_TOP, + STORE_FAST, sv_pos & 0xFF, sv_pos >> 8, + STORE_DEREF, sc_pos & 0xFF, sc_pos >> 8, + ] + + preamble = array('B', preamble) + + # Bytecode for loading the local 'super' variable. + load_super = array('B', [ + LOAD_FAST, sv_pos & 0xFF, sv_pos >> 8, + ]) + + preamble_len = len(preamble) + need_preamble = False + i = 0 + + while i < codelen: + opcode = newcode[i] + need_load = False + remove_store = False + + if opcode == EXTENDED_ARG: + raise TypeError("Cannot use 'super' in function with EXTENDED_ARG opcode") + + # If the opcode is an absolute target it needs to be adjusted + # to take into account the preamble. + elif opcode in ABSOLUTE_TARGET: + oparg = _oparg(newcode, i) + preamble_len + newcode[i+1] = oparg & 0xFF + newcode[i+2] = oparg >> 8 + + # If LOAD_GLOBAL(super) or LOAD_NAME(super) then we want to change it into + # LOAD_FAST(super) + elif (opcode == LOAD_GLOBAL or opcode == LOAD_NAME) and _oparg(newcode, i) == sn_pos: + need_preamble = need_load = True + + # If LOAD_FAST(super) then we just need to add the preamble + elif opcode == LOAD_FAST and _oparg(newcode, i) == sv_pos: + need_preamble = need_load = True + + # If LOAD_DEREF(super) then we change it into LOAD_FAST(super) because + # it's slightly faster. + elif opcode == LOAD_DEREF and _oparg(newcode, i) == sc_pos: + need_preamble = need_load = True + + if need_load: + newcode[i:i+3] = load_super + + i += 1 + + if opcode >= HAVE_ARGUMENT: + i += 2 + + # No changes needed - get out. + if not need_preamble: + return func + + # Our preamble will have 3 things on the stack + co_stacksize = max(3, co.co_stacksize) + + # Conceptually, our preamble is on the `def` line. + co_lnotab = array('B', co.co_lnotab) + + if co_lnotab: + co_lnotab[0] += preamble_len + + co_lnotab = co_lnotab.tostring() + + # Our code consists of the preamble and the modified code. + codestr = (preamble + newcode).tostring() + + codeobj = new.code(co.co_argcount, len(newvarnames), co_stacksize, + co.co_flags, codestr, tuple(newconsts), co.co_names, + tuple(newvarnames), co.co_filename, co.co_name, + co.co_firstlineno, co_lnotab, co.co_freevars, + co.co_cellvars) + + func.func_code = codeobj + func.func_class = cls + return func + + class autosuper_meta(type): + def __init__(cls, name, bases, clsdict): + UnboundMethodType = types.UnboundMethodType + + for v in vars(cls): + o = getattr(cls, v) + if isinstance(o, UnboundMethodType): + _bind_autosuper(o.im_func, cls) + + class autosuper(object): + __metaclass__ = autosuper_meta + + if __name__ == '__main__': + class A(autosuper): + def f(self): + return 'A' + + class B(A): + def f(self): + return 'B' + super.f() + + class C(A): + def f(self): + def inner(): + return 'C' + super.f() + + # Needed to put 'super' into a cell + super = super + return inner() + + class D(B, C): + def f(self, arg=None): + var = None + return 'D' + super.f() + + assert D().f() == 'DBCA' + +Disassembly of B.f and C.f reveals the different preambles used when ``super`` +is simply a local variable compared to when it is used by an inner function. + +:: + + >>> dis.dis(B.f) + + 214 0 LOAD_CONST 4 () + 3 LOAD_CONST 2 () + 6 LOAD_FAST 0 (self) + 9 CALL_FUNCTION 2 + 12 STORE_FAST 1 (super) + + 215 15 LOAD_CONST 1 ('B') + 18 LOAD_FAST 1 (super) + 21 LOAD_ATTR 1 (f) + 24 CALL_FUNCTION 0 + 27 BINARY_ADD + 28 RETURN_VALUE + +:: + + >>> dis.dis(C.f) + + 218 0 LOAD_CONST 4 () + 3 LOAD_CONST 2 () + 6 LOAD_FAST 0 (self) + 9 CALL_FUNCTION 2 + 12 DUP_TOP + 13 STORE_FAST 1 (super) + 16 STORE_DEREF 0 (super) + + 219 19 LOAD_CLOSURE 0 (super) + 22 LOAD_CONST 1 () + 25 MAKE_CLOSURE 0 + 28 STORE_FAST 2 (inner) + + 223 31 LOAD_FAST 1 (super) + 34 STORE_DEREF 0 (super) + + 224 37 LOAD_FAST 2 (inner) + 40 CALL_FUNCTION 0 + 43 RETURN_VALUE + +Note that in the final implementation, the preamble would not be part of the +bytecode of the method, but would occur immediately following unpacking of +parameters. + + +Alternative Proposals +===================== + +No Changes +---------- + +Although its always attractive to just keep things how they are, people have +sought a change in the usage of super calling for some time, and for good +reason, all mentioned previously. + +- Decoupling from the class name (which might not even be bound to the + right class anymore!) +- Simpler looking, cleaner super calls would be better + +Dynamic attribute on super type +------------------------------- + +The proposal adds a dynamic attribute lookup to the super type, which will +automatically determine the proper class and instance parameters. Each super +attribute lookup identifies these parameters and performs the super lookup on +the instance, as the current super implementation does with the explicit +invokation of a super instance upon a class and instance. + +This proposal relies on sys._getframe(), which is not appropriate for anything +except a prototype implementation. + + +super(__this_class__, self) +--------------------------- + +This is nearly an anti-proposal, as it basically relies on the acceptance of +the __this_class__ PEP, which proposes a special name that would always be +bound to the class within which it is used. If that is accepted, __this_class__ +could simply be used instead of the class' name explicitly, solving the name +binding issues [2]_. + +self.__super__.foo(\*args) +-------------------------- + +The __super__ attribute is mentioned in this PEP in several places, and could +be a candidate for the complete solution, actually using it explicitly instead +of any super usage directly. However, double-underscore names are usually an +internal detail, and attempted to be kept out of everyday code. + +super(self, \*args) or __super__(self, \*args) +---------------------------------------------- + +This solution only solves the problem of the type indication, does not handle +differently named super methods, and is explicit about the name of the +instance. It is less flexable without being able to enacted on other method +names, in cases where that is needed. One use case this fails is where a base- +class has a factory classmethod and a subclass has two factory classmethods, +both of which needing to properly make super calls to the one in the base- +class. + +super.foo(self, \*args) +----------------------- + +This variation actually eliminates the problems with locating the proper +instance, and if any of the alternatives were pushed into the spotlight, I +would want it to be this one. + +super or super() +---------------- + +This proposal leaves no room for different names, signatures, or application +to other classes, or instances. A way to allow some similar use alongside the +normal proposal would be favorable, encouraging good design of multiple +inheritence trees and compatible methods. + +super(\*p, \*\*kw) +------------------ + +There has been the proposal that directly calling ``super(*p, **kw)`` would +be equivalent to calling the method on the ``super`` object with the same name +as the method currently being executed i.e. the following two methods would be +equivalent: + +:: + + def f(self, *p, **kw): + super.f(*p, **kw) + +:: + + def f(self, *p, **kw): + super(*p, **kw) + +There is strong sentiment for and against this, but implementation and style +concerns are obvious. Guido has suggested that this should be excluded from +this PEP on the principle of KISS (Keep It Simple Stupid). + + + +History +======= +29-Apr-2007 - Changed title from "Super As A Keyword" to "New Super" + - Updated much of the language and added a terminology section + for clarification in confusing places. + - Added reference implementation and history sections. + +06-May-2007 - Updated by Tim Delaney to reflect discussions on the python-3000 + and python-dev mailing lists. + +References +========== + +.. [1] Fixing super anyone? + (http://mail.python.org/pipermail/python-3000/2007-April/006667.html) + +.. [2] PEP 3130: Access to Module/Class/Function Currently Being Defined (this) + (http://mail.python.org/pipermail/python-ideas/2007-April/000542.html) + + +Copyright +========= + +This document has been placed in the public domain. + + + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + coding: utf-8 + End: From nnorwitz at gmail.com Fri Jun 8 00:27:40 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 7 Jun 2007 15:27:40 -0700 Subject: [Python-checkins] r55814 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c In-Reply-To: <20070607215126.DC59C1E4003@bag.python.org> References: <20070607215126.DC59C1E4003@bag.python.org> Message-ID: On 6/7/07, alexandre.vassalotti wrote: > Author: alexandre.vassalotti > Date: Thu Jun 7 23:51:21 2007 > New Revision: 55814 > > Modified: > python/branches/cpy_merge/Modules/_bytes_iomodule.c > python/branches/cpy_merge/Modules/_string_iomodule.c > Log: > Update to reflect the new IO API. > > > Modified: python/branches/cpy_merge/Modules/_string_iomodule.c > ============================================================================== > --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) > +++ python/branches/cpy_merge/Modules/_string_iomodule.c Thu Jun 7 23:51:21 2007 > static PyObject * > string_io_flush(StringIOObject *self) > { > @@ -326,7 +333,7 @@ > while (--position >= self->string_size) > self->buf[position] = 0; > > - Py_RETURN_NONE; > + return Py_BuildValue("n", self->pos); > } These cases would be better as: return PyInt_FromSsize_t(self->pos); (or something similar.) n From python-checkins at python.org Fri Jun 8 01:25:17 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 8 Jun 2007 01:25:17 +0200 (CEST) Subject: [Python-checkins] r55819 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070607232517.33E4A1E4003@bag.python.org> Author: alexandre.vassalotti Date: Fri Jun 8 01:25:16 2007 New Revision: 55819 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Change the seek method to use PyInt_FromSsize_t instead of Py_BuildValue for creating its return value, as suggested by Neal Norwitz. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Fri Jun 8 01:25:16 2007 @@ -330,7 +330,7 @@ while (--position >= self->string_size) self->buf[position] = 0; - return Py_BuildValue("n", self->pos); + return PyInt_FromSsize_t(self->pos); } static PyObject * Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Fri Jun 8 01:25:16 2007 @@ -333,7 +333,7 @@ while (--position >= self->string_size) self->buf[position] = 0; - return Py_BuildValue("n", self->pos); + return PyInt_FromSsize_t(self->pos); } static PyObject * From alexandre at peadrop.com Fri Jun 8 01:26:50 2007 From: alexandre at peadrop.com (Alexandre Vassalotti) Date: Thu, 7 Jun 2007 19:26:50 -0400 Subject: [Python-checkins] r55814 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c In-Reply-To: References: <20070607215126.DC59C1E4003@bag.python.org> Message-ID: Thanks! I committed the change in r55819. -- Alexandre On 6/7/07, Neal Norwitz wrote: > On 6/7/07, alexandre.vassalotti wrote: > > Author: alexandre.vassalotti > > Date: Thu Jun 7 23:51:21 2007 > > New Revision: 55814 > > > > Modified: > > python/branches/cpy_merge/Modules/_bytes_iomodule.c > > python/branches/cpy_merge/Modules/_string_iomodule.c > > Log: > > Update to reflect the new IO API. > > > > > > Modified: python/branches/cpy_merge/Modules/_string_iomodule.c > > ============================================================================== > > --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) > > +++ python/branches/cpy_merge/Modules/_string_iomodule.c Thu Jun 7 23:51:21 2007 > > static PyObject * > > string_io_flush(StringIOObject *self) > > { > > @@ -326,7 +333,7 @@ > > while (--position >= self->string_size) > > self->buf[position] = 0; > > > > - Py_RETURN_NONE; > > + return Py_BuildValue("n", self->pos); > > } > > These cases would be better as: > > return PyInt_FromSsize_t(self->pos); > > (or something similar.) > > n > From python-checkins at python.org Fri Jun 8 01:53:55 2007 From: python-checkins at python.org (kristjan.jonsson) Date: Fri, 8 Jun 2007 01:53:55 +0200 (CEST) Subject: [Python-checkins] r55821 - python/trunk/Modules/getbuildinfo.c Message-ID: <20070607235355.1C53F1E4003@bag.python.org> Author: kristjan.jonsson Date: Fri Jun 8 01:53:49 2007 New Revision: 55821 Modified: python/trunk/Modules/getbuildinfo.c Log: Fixing changes to getbuildinfo.c that broke linux builds Modified: python/trunk/Modules/getbuildinfo.c ============================================================================== --- python/trunk/Modules/getbuildinfo.c (original) +++ python/trunk/Modules/getbuildinfo.c Fri Jun 8 01:53:49 2007 @@ -20,7 +20,14 @@ #endif #endif +/* on unix, SVNVERSION is passed on the command line. + * on Windows, the string is interpolated using + * subwcrev.exe + */ +#ifndef SVNVERSION #define SVNVERSION "$WCRANGE$$WCMODS?M:$" +#endif + const char * Py_GetBuildInfo(void) { @@ -39,7 +46,7 @@ { /* the following string can be modified by subwcrev.exe */ static const char svnversion[] = SVNVERSION; - if (!strstr(svnversion, "$")) - return svnversion; /* it was interpolated */ + if (svnversion[0] != '$') + return svnversion; /* it was interpolated, or passed on command line */ return "exported"; } From python-checkins at python.org Fri Jun 8 01:56:20 2007 From: python-checkins at python.org (kristjan.jonsson) Date: Fri, 8 Jun 2007 01:56:20 +0200 (CEST) Subject: [Python-checkins] r55822 - python/branches/release25-maint/Modules/getbuildinfo.c Message-ID: <20070607235620.8AF851E4003@bag.python.org> Author: kristjan.jonsson Date: Fri Jun 8 01:56:18 2007 New Revision: 55822 Modified: python/branches/release25-maint/Modules/getbuildinfo.c Log: backport change 55821 to release25-maint Modified: python/branches/release25-maint/Modules/getbuildinfo.c ============================================================================== --- python/branches/release25-maint/Modules/getbuildinfo.c (original) +++ python/branches/release25-maint/Modules/getbuildinfo.c Fri Jun 8 01:56:18 2007 @@ -20,7 +20,14 @@ #endif #endif +/* on unix, SVNVERSION is passed on the command line. + * on Windows, the string is interpolated using + * subwcrev.exe + */ +#ifndef SVNVERSION #define SVNVERSION "$WCRANGE$$WCMODS?M:$" +#endif + const char * Py_GetBuildInfo(void) { @@ -39,7 +46,7 @@ { /* the following string can be modified by subwcrev.exe */ static const char svnversion[] = SVNVERSION; - if (!strstr(svnversion, "$")) - return svnversion; /* it was interpolated */ + if (svnversion[0] != '$') + return svnversion; /* it was interpolated, or passed on command line */ return "exported"; } From nnorwitz at gmail.com Fri Jun 8 11:08:58 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 8 Jun 2007 05:08:58 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (2) Message-ID: <20070608090858.GA17959@python.psfb.org> test_threadsignals leaked [0, 0, -8] references, sum=-8 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Fri Jun 8 18:10:33 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 18:10:33 +0200 (CEST) Subject: [Python-checkins] r55828 - python/trunk/Lib/ctypes/test/test_numbers.py Message-ID: <20070608161033.63DF71E4006@bag.python.org> Author: thomas.heller Date: Fri Jun 8 18:10:27 2007 New Revision: 55828 Modified: python/trunk/Lib/ctypes/test/test_numbers.py Log: Make this test work with older Python releases where struct has no 't' format character. Modified: python/trunk/Lib/ctypes/test/test_numbers.py ============================================================================== --- python/trunk/Lib/ctypes/test/test_numbers.py (original) +++ python/trunk/Lib/ctypes/test/test_numbers.py Fri Jun 8 18:10:27 2007 @@ -117,7 +117,10 @@ def test_sizes(self): for t in signed_types + unsigned_types + float_types + bool_types: - size = struct.calcsize(t._type_) + try: + size = struct.calcsize(t._type_) + except struct.error: + continue # sizeof of the type... self.failUnlessEqual(sizeof(t), size) # and sizeof of an instance From python-checkins at python.org Fri Jun 8 19:29:21 2007 From: python-checkins at python.org (martin.v.loewis) Date: Fri, 8 Jun 2007 19:29:21 +0200 (CEST) Subject: [Python-checkins] r55829 - in python/trunk: Misc/NEWS Objects/bufferobject.c Message-ID: <20070608172921.5A41A1E4006@bag.python.org> Author: martin.v.loewis Date: Fri Jun 8 19:29:20 2007 New Revision: 55829 Modified: python/trunk/Misc/NEWS python/trunk/Objects/bufferobject.c Log: Bug #1733488: Fix compilation of bufferobject.c on AIX. Will backport to 2.5. Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Jun 8 19:29:20 2007 @@ -12,6 +12,8 @@ Core and builtins ----------------- +- Bug #1733488: Fix compilation of bufferobject.c on AIX. + - Bug #1722485: remove docstrings again when running with -OO. - Add new attribute names for function objects. All the func_* become Modified: python/trunk/Objects/bufferobject.c ============================================================================== --- python/trunk/Objects/bufferobject.c (original) +++ python/trunk/Objects/bufferobject.c Fri Jun 8 19:29:20 2007 @@ -19,7 +19,7 @@ READ_BUFFER, WRITE_BUFFER, CHAR_BUFFER, - ANY_BUFFER, + ANY_BUFFER }; static int From python-checkins at python.org Fri Jun 8 19:29:40 2007 From: python-checkins at python.org (martin.v.loewis) Date: Fri, 8 Jun 2007 19:29:40 +0200 (CEST) Subject: [Python-checkins] r55830 - in python/branches/release25-maint: Misc/NEWS Objects/bufferobject.c Message-ID: <20070608172940.D60A71E4006@bag.python.org> Author: martin.v.loewis Date: Fri Jun 8 19:29:40 2007 New Revision: 55830 Modified: python/branches/release25-maint/Misc/NEWS python/branches/release25-maint/Objects/bufferobject.c Log: Bug #1733488: Fix compilation of bufferobject.c on AIX. Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Fri Jun 8 19:29:40 2007 @@ -9,6 +9,12 @@ *Release date: XX-XXX-XXXX* +Core and builtins +----------------- + +- Bug #1733488: Fix compilation of bufferobject.c on AIX. + + Library ------- Modified: python/branches/release25-maint/Objects/bufferobject.c ============================================================================== --- python/branches/release25-maint/Objects/bufferobject.c (original) +++ python/branches/release25-maint/Objects/bufferobject.c Fri Jun 8 19:29:40 2007 @@ -19,7 +19,7 @@ READ_BUFFER, WRITE_BUFFER, CHAR_BUFFER, - ANY_BUFFER, + ANY_BUFFER }; static int From buildbot at python.org Fri Jun 8 19:56:12 2007 From: buildbot at python.org (buildbot at python.org) Date: Fri, 08 Jun 2007 17:56:12 +0000 Subject: [Python-checkins] buildbot warnings in amd64 gentoo trunk Message-ID: <20070608175612.B5F231E4014@bag.python.org> The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520gentoo%2520trunk/builds/2093 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Fri Jun 8 20:07:39 2007 From: buildbot at python.org (buildbot at python.org) Date: Fri, 08 Jun 2007 18:07:39 +0000 Subject: [Python-checkins] buildbot warnings in PPC64 Debian trunk Message-ID: <20070608180739.BD1A61E4006@bag.python.org> The Buildbot has detected a new failure of PPC64 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/PPC64%2520Debian%2520trunk/builds/5 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_socketserver Traceback (most recent call last): File "./Lib/test/regrtest.py", line 557, in runtest_inner indirect_test() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 216, in test_main testall() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 199, in testall testloop(socket.AF_INET, tcpservers, MyStreamHandler, teststream) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 148, in testloop testfunc(proto, addr) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 62, in teststream s.connect(addr) File "", line 1, in connect error: (111, 'Connection refused') Traceback (most recent call last): File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/threading.py", line 478, in __bootstrap (self.getName(), _format_exc())) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/traceback.py", line 236, in format_exc return ''.join(format_exception(etype, value, tb, limit)) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/traceback.py", line 142, in format_exception list = list + format_tb(tb, limit) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/traceback.py", line 76, in format_tb return format_list(extract_tb(tb, limit)) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/traceback.py", line 100, in extract_tb linecache.checkcache(filename) AttributeError: 'NoneType' object has no attribute 'checkcache' make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Fri Jun 8 20:20:14 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 20:20:14 +0200 (CEST) Subject: [Python-checkins] r55831 - python/trunk/Modules/_ctypes/_ctypes.c python/trunk/Modules/_ctypes/callbacks.c python/trunk/Modules/_ctypes/callproc.c python/trunk/Modules/_ctypes/cfield.c python/trunk/Modules/_ctypes/ctypes.h python/trunk/Modules/_ctypes/stgdict.c Message-ID: <20070608182014.1580F1E4007@bag.python.org> Author: thomas.heller Date: Fri Jun 8 20:20:09 2007 New Revision: 55831 Modified: python/trunk/Modules/_ctypes/_ctypes.c python/trunk/Modules/_ctypes/callbacks.c python/trunk/Modules/_ctypes/callproc.c python/trunk/Modules/_ctypes/cfield.c python/trunk/Modules/_ctypes/ctypes.h python/trunk/Modules/_ctypes/stgdict.c Log: [ 1715718 ] x64 clean compile patch for _ctypes, by Kristj?n Valur with small modifications. Modified: python/trunk/Modules/_ctypes/_ctypes.c ============================================================================== --- python/trunk/Modules/_ctypes/_ctypes.c (original) +++ python/trunk/Modules/_ctypes/_ctypes.c Fri Jun 8 20:20:09 2007 @@ -789,7 +789,7 @@ CharArray_set_value(CDataObject *self, PyObject *value) { char *ptr; - int size; + Py_ssize_t size; if (PyUnicode_Check(value)) { value = PyUnicode_AsEncodedString(value, @@ -844,7 +844,7 @@ static int WCharArray_set_value(CDataObject *self, PyObject *value) { - int result = 0; + Py_ssize_t result = 0; if (PyString_Check(value)) { value = PyUnicode_FromEncodedObject(value, @@ -868,14 +868,12 @@ result = PyUnicode_AsWideChar((PyUnicodeObject *)value, (wchar_t *)self->b_ptr, self->b_size/sizeof(wchar_t)); - if (result >= 0 && (unsigned)result < self->b_size/sizeof(wchar_t)) + if (result >= 0 && (size_t)result < self->b_size/sizeof(wchar_t)) ((wchar_t *)self->b_ptr)[result] = (wchar_t)0; - if (result > 0) - result = 0; done: Py_DECREF(value); - return result; + return result >= 0 ? 0 : -1; } static PyGetSetDef WCharArray_getsets[] = { @@ -966,7 +964,7 @@ PyObject *typedict; int length; - int itemsize, itemalign; + Py_ssize_t itemsize, itemalign; typedict = PyTuple_GetItem(args, 2); if (!typedict) @@ -1737,8 +1735,8 @@ converters_from_argtypes(PyObject *ob) { PyObject *converters; - int i; - int nArgs; + Py_ssize_t i; + Py_ssize_t nArgs; ob = PySequence_Tuple(ob); /* new reference */ if (!ob) { @@ -2591,18 +2589,18 @@ #ifdef MS_WIN32 static PPROC FindAddress(void *handle, char *name, PyObject *type) { +#ifdef MS_WIN64 + /* win64 has no stdcall calling conv, so it should + also not have the name mangling of it. + */ + return (PPROC)GetProcAddress(handle, name); +#else PPROC address; char *mangled_name; int i; StgDictObject *dict; address = (PPROC)GetProcAddress(handle, name); -#ifdef _WIN64 - /* win64 has no stdcall calling conv, so it should - also not have the name mangling of it. - */ - return address; -#else if (address) return address; if (((size_t)name & ~0xFFFF) == 0) { @@ -2634,7 +2632,7 @@ /* Return 1 if usable, 0 else and exception set. */ static int -_check_outarg_type(PyObject *arg, int index) +_check_outarg_type(PyObject *arg, Py_ssize_t index) { StgDictObject *dict; @@ -2655,7 +2653,7 @@ PyErr_Format(PyExc_TypeError, "'out' parameter %d must be a pointer type, not %s", - index, + Py_SAFE_DOWNCAST(index, Py_ssize_t, int), PyType_Check(arg) ? ((PyTypeObject *)arg)->tp_name : arg->ob_type->tp_name); @@ -2666,7 +2664,7 @@ static int _validate_paramflags(PyTypeObject *type, PyObject *paramflags) { - int i, len; + Py_ssize_t i, len; StgDictObject *dict; PyObject *argtypes; @@ -3051,12 +3049,12 @@ PyObject *paramflags = self->paramflags; PyObject *callargs; StgDictObject *dict; - int i, len; + Py_ssize_t i, len; int inargs_index = 0; /* It's a little bit difficult to determine how many arguments the function call requires/accepts. For simplicity, we count the consumed args and compare this to the number of supplied args. */ - int actual_args; + Py_ssize_t actual_args; *poutmask = 0; *pinoutmask = 0; @@ -3093,7 +3091,7 @@ /* This way seems to be ~2 us faster than the PyArg_ParseTuple calls below. */ /* We HAVE already checked that the tuple can be parsed with "i|zO", so... */ - int tsize = PyTuple_GET_SIZE(item); + Py_ssize_t tsize = PyTuple_GET_SIZE(item); flag = PyInt_AS_LONG(PyTuple_GET_ITEM(item, 0)); name = tsize > 1 ? PyString_AS_STRING(PyTuple_GET_ITEM(item, 1)) : NULL; defval = tsize > 2 ? PyTuple_GET_ITEM(item, 2) : NULL; @@ -3339,8 +3337,10 @@ return NULL; if (converters) { - int required = PyTuple_GET_SIZE(converters); - int actual = PyTuple_GET_SIZE(callargs); + int required = Py_SAFE_DOWNCAST(PyTuple_GET_SIZE(converters), + Py_ssize_t, int); + int actual = Py_SAFE_DOWNCAST(PyTuple_GET_SIZE(callargs), + Py_ssize_t, int); if ((dict->flags & FUNCFLAG_CDECL) == FUNCFLAG_CDECL) { /* For cdecl functions, we allow more actual arguments @@ -3679,8 +3679,8 @@ static int Array_init(CDataObject *self, PyObject *args, PyObject *kw) { - int i; - int n; + Py_ssize_t i; + Py_ssize_t n; if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, @@ -3701,7 +3701,7 @@ Array_item(PyObject *_self, Py_ssize_t index) { CDataObject *self = (CDataObject *)_self; - int offset, size; + Py_ssize_t offset, size; StgDictObject *stgdict; @@ -3773,7 +3773,7 @@ Array_ass_item(PyObject *_self, Py_ssize_t index, PyObject *value) { CDataObject *self = (CDataObject *)_self; - int size, offset; + Py_ssize_t size, offset; StgDictObject *stgdict; char *ptr; @@ -3802,7 +3802,7 @@ Array_ass_slice(PyObject *_self, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *value) { CDataObject *self = (CDataObject *)_self; - int i, len; + Py_ssize_t i, len; if (value == NULL) { PyErr_SetString(PyExc_TypeError, @@ -4164,7 +4164,7 @@ Pointer_item(PyObject *_self, Py_ssize_t index) { CDataObject *self = (CDataObject *)_self; - int size; + Py_ssize_t size; Py_ssize_t offset; StgDictObject *stgdict, *itemdict; PyObject *proto; @@ -4195,7 +4195,7 @@ Pointer_ass_item(PyObject *_self, Py_ssize_t index, PyObject *value) { CDataObject *self = (CDataObject *)_self; - int size; + Py_ssize_t size; Py_ssize_t offset; StgDictObject *stgdict, *itemdict; PyObject *proto; @@ -4629,9 +4629,10 @@ static PyObject * wstring_at(const wchar_t *ptr, int size) { - if (size == -1) - size = wcslen(ptr); - return PyUnicode_FromWideChar(ptr, size); + Py_ssize_t ssize = size; + if (ssize == -1) + ssize = wcslen(ptr); + return PyUnicode_FromWideChar(ptr, ssize); } #endif @@ -4831,7 +4832,7 @@ return (PyObject *)unicode; } -int My_PyUnicode_AsWideChar(PyUnicodeObject *unicode, +Py_ssize_t My_PyUnicode_AsWideChar(PyUnicodeObject *unicode, register wchar_t *w, Py_ssize_t size) { Modified: python/trunk/Modules/_ctypes/callbacks.c ============================================================================== --- python/trunk/Modules/_ctypes/callbacks.c (original) +++ python/trunk/Modules/_ctypes/callbacks.c Fri Jun 8 20:20:09 2007 @@ -123,10 +123,10 @@ PyObject *converters, void **pArgs) { - int i; + Py_ssize_t i; PyObject *result; PyObject *arglist = NULL; - int nArgs; + Py_ssize_t nArgs; #ifdef WITH_THREAD PyGILState_STATE state = PyGILState_Ensure(); #endif @@ -264,7 +264,7 @@ { int result; ffi_info *p; - int nArgs, i; + Py_ssize_t nArgs, i; ffi_abi cc; nArgs = PySequence_Size(converters); @@ -307,7 +307,8 @@ if (is_cdecl == 0) cc = FFI_STDCALL; #endif - result = ffi_prep_cif(&p->cif, cc, nArgs, + result = ffi_prep_cif(&p->cif, cc, + Py_SAFE_DOWNCAST(nArgs, Py_ssize_t, int), GetType(restype), &p->atypes[0]); if (result != FFI_OK) { Modified: python/trunk/Modules/_ctypes/callproc.c ============================================================================== --- python/trunk/Modules/_ctypes/callproc.c (original) +++ python/trunk/Modules/_ctypes/callproc.c Fri Jun 8 20:20:09 2007 @@ -361,13 +361,13 @@ case 'z': case 'Z': case 'P': - sprintf(buffer, "", - self->tag, (long)self->value.p); + sprintf(buffer, "", + self->tag, self->value.p); break; default: - sprintf(buffer, "", - self->tag, (long)self); + sprintf(buffer, "", + self->tag, self); break; } return PyString_FromString(buffer); @@ -464,7 +464,7 @@ /* * Convert a single Python object into a PyCArgObject and return it. */ -static int ConvParam(PyObject *obj, int index, struct argument *pa) +static int ConvParam(PyObject *obj, Py_ssize_t index, struct argument *pa) { StgDictObject *dict; pa->keep = NULL; /* so we cannot forget it later */ @@ -572,7 +572,8 @@ return result; } PyErr_Format(PyExc_TypeError, - "Don't know how to convert parameter %d", index); + "Don't know how to convert parameter %d", + Py_SAFE_DOWNCAST(index, Py_ssize_t, int)); return -1; } } @@ -912,7 +913,7 @@ PyObject *restype, PyObject *checker) { - int i, n, argcount, argtype_count; + Py_ssize_t i, n, argcount, argtype_count; void *resbuf; struct argument *args, *pa; ffi_type **atypes; @@ -1002,7 +1003,10 @@ } if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, - rtype, resbuf, argcount)) + rtype, resbuf, + Py_SAFE_DOWNCAST(argcount, + Py_ssize_t, + int))) goto cleanup; #ifdef WORDS_BIGENDIAN @@ -1358,10 +1362,10 @@ dict = PyType_stgdict(obj); if (dict) - return PyInt_FromLong(dict->size); + return PyInt_FromSsize_t(dict->size); if (CDataObject_Check(obj)) - return PyInt_FromLong(((CDataObject *)obj)->b_size); + return PyInt_FromSsize_t(((CDataObject *)obj)->b_size); PyErr_SetString(PyExc_TypeError, "this type has no size"); return NULL; @@ -1379,11 +1383,11 @@ dict = PyType_stgdict(obj); if (dict) - return PyInt_FromLong(dict->align); + return PyInt_FromSsize_t(dict->align); dict = PyObject_stgdict(obj); if (dict) - return PyInt_FromLong(dict->align); + return PyInt_FromSsize_t(dict->align); PyErr_SetString(PyExc_TypeError, "no alignment info"); Modified: python/trunk/Modules/_ctypes/cfield.c ============================================================================== --- python/trunk/Modules/_ctypes/cfield.c (original) +++ python/trunk/Modules/_ctypes/cfield.c Fri Jun 8 20:20:09 2007 @@ -35,14 +35,14 @@ * prev_desc points to the type of the previous bitfield, if any. */ PyObject * -CField_FromDesc(PyObject *desc, int index, - int *pfield_size, int bitsize, int *pbitofs, - int *psize, int *poffset, int *palign, +CField_FromDesc(PyObject *desc, Py_ssize_t index, + Py_ssize_t *pfield_size, int bitsize, int *pbitofs, + Py_ssize_t *psize, Py_ssize_t *poffset, Py_ssize_t *palign, int pack, int big_endian) { CFieldObject *self; PyObject *proto; - int size, align, length; + Py_ssize_t size, align, length; SETFUNC setfunc = NULL; GETFUNC getfunc = NULL; StgDictObject *dict; @@ -147,7 +147,7 @@ else align = dict->align; if (align && *poffset % align) { - int delta = align - (*poffset % align); + Py_ssize_t delta = align - (*poffset % align); *psize += delta; *poffset += delta; } @@ -268,8 +268,8 @@ CField_repr(CFieldObject *self) { PyObject *result; - int bits = self->size >> 16; - int size = self->size & 0xFFFF; + Py_ssize_t bits = self->size >> 16; + Py_ssize_t size = self->size & 0xFFFF; const char *name; name = ((PyTypeObject *)self->proto)->tp_name; @@ -519,7 +519,7 @@ */ static PyObject * -b_set(void *ptr, PyObject *value, unsigned size) +b_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; if (get_long(value, &val) < 0) @@ -530,7 +530,7 @@ static PyObject * -b_get(void *ptr, unsigned size) +b_get(void *ptr, Py_ssize_t size) { signed char val = *(signed char *)ptr; GET_BITFIELD(val, size); @@ -538,7 +538,7 @@ } static PyObject * -B_set(void *ptr, PyObject *value, unsigned size) +B_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; if (get_ulong(value, &val) < 0) @@ -550,7 +550,7 @@ static PyObject * -B_get(void *ptr, unsigned size) +B_get(void *ptr, Py_ssize_t size) { unsigned char val = *(unsigned char *)ptr; GET_BITFIELD(val, size); @@ -558,7 +558,7 @@ } static PyObject * -h_set(void *ptr, PyObject *value, unsigned size) +h_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; short x; @@ -572,7 +572,7 @@ static PyObject * -h_set_sw(void *ptr, PyObject *value, unsigned size) +h_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; short field; @@ -587,7 +587,7 @@ } static PyObject * -h_get(void *ptr, unsigned size) +h_get(void *ptr, Py_ssize_t size) { short val; memcpy(&val, ptr, sizeof(val)); @@ -596,7 +596,7 @@ } static PyObject * -h_get_sw(void *ptr, unsigned size) +h_get_sw(void *ptr, Py_ssize_t size) { short val; memcpy(&val, ptr, sizeof(val)); @@ -606,7 +606,7 @@ } static PyObject * -H_set(void *ptr, PyObject *value, unsigned size) +H_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned short x; @@ -619,7 +619,7 @@ } static PyObject * -H_set_sw(void *ptr, PyObject *value, unsigned size) +H_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned short field; @@ -635,7 +635,7 @@ static PyObject * -H_get(void *ptr, unsigned size) +H_get(void *ptr, Py_ssize_t size) { unsigned short val; memcpy(&val, ptr, sizeof(val)); @@ -644,7 +644,7 @@ } static PyObject * -H_get_sw(void *ptr, unsigned size) +H_get_sw(void *ptr, Py_ssize_t size) { unsigned short val; memcpy(&val, ptr, sizeof(val)); @@ -654,7 +654,7 @@ } static PyObject * -i_set(void *ptr, PyObject *value, unsigned size) +i_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; int x; @@ -667,7 +667,7 @@ } static PyObject * -i_set_sw(void *ptr, PyObject *value, unsigned size) +i_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; int field; @@ -683,7 +683,7 @@ static PyObject * -i_get(void *ptr, unsigned size) +i_get(void *ptr, Py_ssize_t size) { int val; memcpy(&val, ptr, sizeof(val)); @@ -692,7 +692,7 @@ } static PyObject * -i_get_sw(void *ptr, unsigned size) +i_get_sw(void *ptr, Py_ssize_t size) { int val; memcpy(&val, ptr, sizeof(val)); @@ -704,7 +704,7 @@ #ifdef MS_WIN32 /* short BOOL - VARIANT_BOOL */ static PyObject * -vBOOL_set(void *ptr, PyObject *value, unsigned size) +vBOOL_set(void *ptr, PyObject *value, Py_ssize_t size) { switch (PyObject_IsTrue(value)) { case -1: @@ -719,7 +719,7 @@ } static PyObject * -vBOOL_get(void *ptr, unsigned size) +vBOOL_get(void *ptr, Py_ssize_t size) { return PyBool_FromLong((long)*(short int *)ptr); } @@ -734,7 +734,7 @@ #endif static PyObject * -t_set(void *ptr, PyObject *value, unsigned size) +t_set(void *ptr, PyObject *value, Py_ssize_t size) { switch (PyObject_IsTrue(value)) { case -1: @@ -749,13 +749,13 @@ } static PyObject * -t_get(void *ptr, unsigned size) +t_get(void *ptr, Py_ssize_t size) { return PyBool_FromLong((long)*(BOOL_TYPE *)ptr); } static PyObject * -I_set(void *ptr, PyObject *value, unsigned size) +I_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned int x; @@ -768,7 +768,7 @@ } static PyObject * -I_set_sw(void *ptr, PyObject *value, unsigned size) +I_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned int field; @@ -783,7 +783,7 @@ static PyObject * -I_get(void *ptr, unsigned size) +I_get(void *ptr, Py_ssize_t size) { unsigned int val; memcpy(&val, ptr, sizeof(val)); @@ -792,7 +792,7 @@ } static PyObject * -I_get_sw(void *ptr, unsigned size) +I_get_sw(void *ptr, Py_ssize_t size) { unsigned int val; memcpy(&val, ptr, sizeof(val)); @@ -802,7 +802,7 @@ } static PyObject * -l_set(void *ptr, PyObject *value, unsigned size) +l_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; long x; @@ -815,7 +815,7 @@ } static PyObject * -l_set_sw(void *ptr, PyObject *value, unsigned size) +l_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; long field; @@ -831,7 +831,7 @@ static PyObject * -l_get(void *ptr, unsigned size) +l_get(void *ptr, Py_ssize_t size) { long val; memcpy(&val, ptr, sizeof(val)); @@ -840,7 +840,7 @@ } static PyObject * -l_get_sw(void *ptr, unsigned size) +l_get_sw(void *ptr, Py_ssize_t size) { long val; memcpy(&val, ptr, sizeof(val)); @@ -850,7 +850,7 @@ } static PyObject * -L_set(void *ptr, PyObject *value, unsigned size) +L_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned long x; @@ -863,7 +863,7 @@ } static PyObject * -L_set_sw(void *ptr, PyObject *value, unsigned size) +L_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned long field; @@ -879,7 +879,7 @@ static PyObject * -L_get(void *ptr, unsigned size) +L_get(void *ptr, Py_ssize_t size) { unsigned long val; memcpy(&val, ptr, sizeof(val)); @@ -888,7 +888,7 @@ } static PyObject * -L_get_sw(void *ptr, unsigned size) +L_get_sw(void *ptr, Py_ssize_t size) { unsigned long val; memcpy(&val, ptr, sizeof(val)); @@ -899,7 +899,7 @@ #ifdef HAVE_LONG_LONG static PyObject * -q_set(void *ptr, PyObject *value, unsigned size) +q_set(void *ptr, PyObject *value, Py_ssize_t size) { PY_LONG_LONG val; PY_LONG_LONG x; @@ -912,7 +912,7 @@ } static PyObject * -q_set_sw(void *ptr, PyObject *value, unsigned size) +q_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { PY_LONG_LONG val; PY_LONG_LONG field; @@ -927,7 +927,7 @@ } static PyObject * -q_get(void *ptr, unsigned size) +q_get(void *ptr, Py_ssize_t size) { PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -936,7 +936,7 @@ } static PyObject * -q_get_sw(void *ptr, unsigned size) +q_get_sw(void *ptr, Py_ssize_t size) { PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -946,7 +946,7 @@ } static PyObject * -Q_set(void *ptr, PyObject *value, unsigned size) +Q_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned PY_LONG_LONG val; unsigned PY_LONG_LONG x; @@ -959,7 +959,7 @@ } static PyObject * -Q_set_sw(void *ptr, PyObject *value, unsigned size) +Q_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned PY_LONG_LONG val; unsigned PY_LONG_LONG field; @@ -974,7 +974,7 @@ } static PyObject * -Q_get(void *ptr, unsigned size) +Q_get(void *ptr, Py_ssize_t size) { unsigned PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -983,7 +983,7 @@ } static PyObject * -Q_get_sw(void *ptr, unsigned size) +Q_get_sw(void *ptr, Py_ssize_t size) { unsigned PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -1000,7 +1000,7 @@ static PyObject * -d_set(void *ptr, PyObject *value, unsigned size) +d_set(void *ptr, PyObject *value, Py_ssize_t size) { double x; @@ -1016,7 +1016,7 @@ } static PyObject * -d_get(void *ptr, unsigned size) +d_get(void *ptr, Py_ssize_t size) { double val; memcpy(&val, ptr, sizeof(val)); @@ -1024,7 +1024,7 @@ } static PyObject * -d_set_sw(void *ptr, PyObject *value, unsigned size) +d_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { double x; @@ -1046,7 +1046,7 @@ } static PyObject * -d_get_sw(void *ptr, unsigned size) +d_get_sw(void *ptr, Py_ssize_t size) { #ifdef WORDS_BIGENDIAN return PyFloat_FromDouble(_PyFloat_Unpack8(ptr, 1)); @@ -1056,7 +1056,7 @@ } static PyObject * -f_set(void *ptr, PyObject *value, unsigned size) +f_set(void *ptr, PyObject *value, Py_ssize_t size) { float x; @@ -1072,7 +1072,7 @@ } static PyObject * -f_get(void *ptr, unsigned size) +f_get(void *ptr, Py_ssize_t size) { float val; memcpy(&val, ptr, sizeof(val)); @@ -1080,7 +1080,7 @@ } static PyObject * -f_set_sw(void *ptr, PyObject *value, unsigned size) +f_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { float x; @@ -1102,7 +1102,7 @@ } static PyObject * -f_get_sw(void *ptr, unsigned size) +f_get_sw(void *ptr, Py_ssize_t size) { #ifdef WORDS_BIGENDIAN return PyFloat_FromDouble(_PyFloat_Unpack4(ptr, 1)); @@ -1122,7 +1122,7 @@ Py_DECREF on destruction. Maybe only when b_needsfree is non-zero. */ static PyObject * -O_get(void *ptr, unsigned size) +O_get(void *ptr, Py_ssize_t size) { PyObject *ob = *(PyObject **)ptr; if (ob == NULL) { @@ -1137,7 +1137,7 @@ } static PyObject * -O_set(void *ptr, PyObject *value, unsigned size) +O_set(void *ptr, PyObject *value, Py_ssize_t size) { /* Hm, does the memory block need it's own refcount or not? */ *(PyObject **)ptr = value; @@ -1147,7 +1147,7 @@ static PyObject * -c_set(void *ptr, PyObject *value, unsigned size) +c_set(void *ptr, PyObject *value, Py_ssize_t size) { if (!PyString_Check(value) || (1 != PyString_Size(value))) { PyErr_Format(PyExc_TypeError, @@ -1160,7 +1160,7 @@ static PyObject * -c_get(void *ptr, unsigned size) +c_get(void *ptr, Py_ssize_t size) { return PyString_FromStringAndSize((char *)ptr, 1); } @@ -1168,9 +1168,9 @@ #ifdef CTYPES_UNICODE /* u - a single wchar_t character */ static PyObject * -u_set(void *ptr, PyObject *value, unsigned size) +u_set(void *ptr, PyObject *value, Py_ssize_t size) { - int len; + Py_ssize_t len; if (PyString_Check(value)) { value = PyUnicode_FromEncodedObject(value, @@ -1202,17 +1202,17 @@ static PyObject * -u_get(void *ptr, unsigned size) +u_get(void *ptr, Py_ssize_t size) { return PyUnicode_FromWideChar((wchar_t *)ptr, 1); } /* U - a unicode string */ static PyObject * -U_get(void *ptr, unsigned size) +U_get(void *ptr, Py_ssize_t size) { PyObject *result; - unsigned int len; + Py_ssize_t len; Py_UNICODE *p; size /= sizeof(wchar_t); /* we count character units here, not bytes */ @@ -1240,9 +1240,9 @@ } static PyObject * -U_set(void *ptr, PyObject *value, unsigned length) +U_set(void *ptr, PyObject *value, Py_ssize_t length) { - unsigned int size; + Py_ssize_t size; /* It's easier to calculate in characters than in bytes */ length /= sizeof(wchar_t); @@ -1277,9 +1277,10 @@ #endif static PyObject * -s_get(void *ptr, unsigned size) +s_get(void *ptr, Py_ssize_t size) { PyObject *result; + size_t slen; result = PyString_FromString((char *)ptr); if (!result) @@ -1287,7 +1288,8 @@ /* chop off at the first NUL character, if any. * On error, result will be deallocated and set to NULL. */ - size = min(size, strlen(PyString_AS_STRING(result))); + slen = strlen(PyString_AS_STRING(result)); + size = min(size, (Py_ssize_t)slen); if (result->ob_refcnt == 1) { /* shorten the result */ _PyString_Resize(&result, size); @@ -1298,10 +1300,10 @@ } static PyObject * -s_set(void *ptr, PyObject *value, unsigned length) +s_set(void *ptr, PyObject *value, Py_ssize_t length) { char *data; - unsigned size; + Py_ssize_t size; data = PyString_AsString(value); if (!data) @@ -1324,7 +1326,7 @@ } static PyObject * -z_set(void *ptr, PyObject *value, unsigned size) +z_set(void *ptr, PyObject *value, Py_ssize_t size) { if (value == Py_None) { *(char **)ptr = NULL; @@ -1358,7 +1360,7 @@ } static PyObject * -z_get(void *ptr, unsigned size) +z_get(void *ptr, Py_ssize_t size) { /* XXX What about invalid pointers ??? */ if (*(void **)ptr) { @@ -1379,7 +1381,7 @@ #ifdef CTYPES_UNICODE static PyObject * -Z_set(void *ptr, PyObject *value, unsigned size) +Z_set(void *ptr, PyObject *value, Py_ssize_t size) { if (value == Py_None) { *(wchar_t **)ptr = NULL; @@ -1447,7 +1449,7 @@ } static PyObject * -Z_get(void *ptr, unsigned size) +Z_get(void *ptr, Py_ssize_t size) { wchar_t *p; p = *(wchar_t **)ptr; @@ -1470,7 +1472,7 @@ #ifdef MS_WIN32 static PyObject * -BSTR_set(void *ptr, PyObject *value, unsigned size) +BSTR_set(void *ptr, PyObject *value, Py_ssize_t size) { BSTR bstr; @@ -1494,8 +1496,13 @@ /* create a BSTR from value */ if (value) { + Py_ssize_t size = PyUnicode_GET_SIZE(value); + if ((unsigned) size != size) { + PyErr_SetString(PyExc_ValueError, "String too long for BSTR"); + return NULL; + } bstr = SysAllocStringLen(PyUnicode_AS_UNICODE(value), - PyUnicode_GET_SIZE(value)); + (unsigned)size); Py_DECREF(value); } else bstr = NULL; @@ -1513,7 +1520,7 @@ static PyObject * -BSTR_get(void *ptr, unsigned size) +BSTR_get(void *ptr, Py_ssize_t size) { BSTR p; p = *(BSTR *)ptr; @@ -1530,7 +1537,7 @@ #endif static PyObject * -P_set(void *ptr, PyObject *value, unsigned size) +P_set(void *ptr, PyObject *value, Py_ssize_t size) { void *v; if (value == Py_None) { @@ -1563,7 +1570,7 @@ } static PyObject * -P_get(void *ptr, unsigned size) +P_get(void *ptr, Py_ssize_t size) { if (*(void **)ptr == NULL) { Py_INCREF(Py_None); Modified: python/trunk/Modules/_ctypes/ctypes.h ============================================================================== --- python/trunk/Modules/_ctypes/ctypes.h (original) +++ python/trunk/Modules/_ctypes/ctypes.h Fri Jun 8 20:20:09 2007 @@ -4,6 +4,7 @@ #if (PY_VERSION_HEX < 0x02050000) typedef int Py_ssize_t; +#define PyInt_FromSsize_t PyInt_FromLong #endif #ifndef MS_WIN32 @@ -31,8 +32,8 @@ typedef struct tagPyCArgObject PyCArgObject; typedef struct tagCDataObject CDataObject; -typedef PyObject *(* GETFUNC)(void *, unsigned size); -typedef PyObject *(* SETFUNC)(void *, PyObject *value, unsigned size); +typedef PyObject *(* GETFUNC)(void *, Py_ssize_t size); +typedef PyObject *(* SETFUNC)(void *, PyObject *value, Py_ssize_t size); typedef PyCArgObject *(* PARAMFUNC)(CDataObject *obj); /* A default buffer in CDataObject, which can be used for small C types. If @@ -137,9 +138,9 @@ extern PyObject * -CField_FromDesc(PyObject *desc, int index, - int *pfield_size, int bitsize, int *pbitofs, - int *psize, int *poffset, int *palign, +CField_FromDesc(PyObject *desc, Py_ssize_t index, + Py_ssize_t *pfield_size, int bitsize, int *pbitofs, + Py_ssize_t *psize, Py_ssize_t *poffset, Py_ssize_t *palign, int pack, int is_big_endian); extern PyObject *CData_AtAddress(PyObject *type, void *buf); @@ -310,7 +311,7 @@ void *p; } value; PyObject *obj; - int size; /* for the 'V' tag */ + Py_ssize_t size; /* for the 'V' tag */ }; extern PyTypeObject PyCArg_Type; @@ -387,7 +388,7 @@ # define PyUnicode_AsWideChar My_PyUnicode_AsWideChar extern PyObject *My_PyUnicode_FromWideChar(const wchar_t *, Py_ssize_t); -extern int My_PyUnicode_AsWideChar(PyUnicodeObject *, wchar_t *, Py_ssize_t); +extern Py_ssize_t My_PyUnicode_AsWideChar(PyUnicodeObject *, wchar_t *, Py_ssize_t); #endif Modified: python/trunk/Modules/_ctypes/stgdict.c ============================================================================== --- python/trunk/Modules/_ctypes/stgdict.c (original) +++ python/trunk/Modules/_ctypes/stgdict.c Fri Jun 8 20:20:09 2007 @@ -50,7 +50,7 @@ StgDict_clone(StgDictObject *dst, StgDictObject *src) { char *d, *s; - int size; + Py_ssize_t size; StgDict_clear(dst); PyMem_Free(dst->ffi_type_pointer.elements); @@ -289,13 +289,13 @@ StructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct) { StgDictObject *stgdict, *basedict; - int len, offset, size, align, i; - int union_size, total_align; - int field_size = 0; + Py_ssize_t len, offset, size, align, i; + Py_ssize_t union_size, total_align; + Py_ssize_t field_size = 0; int bitofs; PyObject *isPacked; int pack = 0; - int ffi_ofs; + Py_ssize_t ffi_ofs; int big_endian; /* HACK Alert: I cannot be bothered to fix ctypes.com, so there has to @@ -484,7 +484,9 @@ /* Adjust the size according to the alignment requirements */ size = ((size + total_align - 1) / total_align) * total_align; - stgdict->ffi_type_pointer.alignment = total_align; + stgdict->ffi_type_pointer.alignment = Py_SAFE_DOWNCAST(total_align, + Py_ssize_t, + unsigned short); stgdict->ffi_type_pointer.size = size; stgdict->size = size; From python-checkins at python.org Fri Jun 8 21:01:10 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 21:01:10 +0200 (CEST) Subject: [Python-checkins] r55832 - python/trunk/Modules/_ctypes/_ctypes.c python/trunk/Modules/_ctypes/cfield.c python/trunk/Modules/_ctypes/stgdict.c Message-ID: <20070608190110.2D2101E4004@bag.python.org> Author: thomas.heller Date: Fri Jun 8 21:01:06 2007 New Revision: 55832 Modified: python/trunk/Modules/_ctypes/_ctypes.c python/trunk/Modules/_ctypes/cfield.c python/trunk/Modules/_ctypes/stgdict.c Log: Fix gcc warnings intruduced by passing Py_ssize_t to PyErr_Format calls. Modified: python/trunk/Modules/_ctypes/_ctypes.c ============================================================================== --- python/trunk/Modules/_ctypes/_ctypes.c (original) +++ python/trunk/Modules/_ctypes/_ctypes.c Fri Jun 8 21:01:06 2007 @@ -1769,7 +1769,12 @@ Py_XDECREF(converters); Py_DECREF(ob); PyErr_Format(PyExc_TypeError, - "item %d in _argtypes_ has no from_param method", i+1); +#if (PY_VERSION_HEX < 0x02050000) + "item %d in _argtypes_ has no from_param method", +#else + "item %zd in _argtypes_ has no from_param method", +#endif + i+1); return NULL; } @@ -3191,7 +3196,11 @@ message is misleading. See unittests/test_paramflags.py */ PyErr_Format(PyExc_TypeError, +#if (PY_VERSION_HEX < 0x02050000) "call takes exactly %d arguments (%d given)", +#else + "call takes exactly %d arguments (%zd given)", +#endif inargs_index, actual_args); goto error; } Modified: python/trunk/Modules/_ctypes/cfield.c ============================================================================== --- python/trunk/Modules/_ctypes/cfield.c (original) +++ python/trunk/Modules/_ctypes/cfield.c Fri Jun 8 21:01:06 2007 @@ -220,21 +220,13 @@ static PyObject * CField_get_offset(PyObject *self, void *data) { -#if (PY_VERSION_HEX < 0x02050000) - return PyInt_FromLong(((CFieldObject *)self)->offset); -#else return PyInt_FromSsize_t(((CFieldObject *)self)->offset); -#endif } static PyObject * CField_get_size(PyObject *self, void *data) { -#if (PY_VERSION_HEX < 0x02050000) - return PyInt_FromLong(((CFieldObject *)self)->size); -#else return PyInt_FromSsize_t(((CFieldObject *)self)->size); -#endif } static PyGetSetDef CField_getset[] = { @@ -279,7 +271,7 @@ #if (PY_VERSION_HEX < 0x02050000) "", #else - "", + "", #endif name, self->offset, size, bits); else @@ -287,7 +279,7 @@ #if (PY_VERSION_HEX < 0x02050000) "", #else - "", + "", #endif name, self->offset, size); return result; @@ -1263,7 +1255,11 @@ size = PyUnicode_GET_SIZE(value); if (size > length) { PyErr_Format(PyExc_ValueError, +#if (PY_VERSION_HEX < 0x02050000) "string too long (%d, maximum length %d)", +#else + "string too long (%zd, maximum length %zd)", +#endif size, length); Py_DECREF(value); return NULL; @@ -1316,7 +1312,11 @@ ++size; } else if (size > length) { PyErr_Format(PyExc_ValueError, +#if (PY_VERSION_HEX < 0x02050000) "string too long (%d, maximum length %d)", +#else + "string too long (%zd, maximum length %zd)", +#endif size, length); return NULL; } Modified: python/trunk/Modules/_ctypes/stgdict.c ============================================================================== --- python/trunk/Modules/_ctypes/stgdict.c (original) +++ python/trunk/Modules/_ctypes/stgdict.c Fri Jun 8 21:01:06 2007 @@ -406,7 +406,11 @@ if (dict == NULL) { Py_DECREF(pair); PyErr_Format(PyExc_TypeError, +#if (PY_VERSION_HEX < 0x02050000) "second item in _fields_ tuple (index %d) must be a C type", +#else + "second item in _fields_ tuple (index %zd) must be a C type", +#endif i); return -1; } From python-checkins at python.org Fri Jun 8 21:08:37 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 21:08:37 +0200 (CEST) Subject: [Python-checkins] r55833 - python/trunk/Doc/lib/libctypes.tex Message-ID: <20070608190837.1C0261E4004@bag.python.org> Author: thomas.heller Date: Fri Jun 8 21:08:31 2007 New Revision: 55833 Modified: python/trunk/Doc/lib/libctypes.tex Log: Fix wrong documentation, and correct the punktuation. Closes [1700455]. Modified: python/trunk/Doc/lib/libctypes.tex ============================================================================== --- python/trunk/Doc/lib/libctypes.tex (original) +++ python/trunk/Doc/lib/libctypes.tex Fri Jun 8 21:08:31 2007 @@ -437,8 +437,8 @@ expecting pointers to mutable memory. If you need mutable memory blocks, ctypes has a \code{create{\_}string{\_}buffer} function which creates these in various ways. The current memory block contents can be -accessed (or changed) with the \code{raw} property, if you want to access -it as NUL terminated string, use the \code{string} property: +accessed (or changed) with the \code{raw} property; if you want to access +it as NUL terminated string, use the \code{value} property: \begin{verbatim} >>> from ctypes import * >>> p = create_string_buffer(3) # create a 3 byte buffer, initialized to NUL bytes From python-checkins at python.org Fri Jun 8 21:14:24 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 21:14:24 +0200 (CEST) Subject: [Python-checkins] r55834 - python/trunk/Modules/_ctypes/libffi/src/x86/ffi.c python/trunk/Modules/_ctypes/libffi/src/x86/ffi64.c Message-ID: <20070608191424.AE55B1E4004@bag.python.org> Author: thomas.heller Date: Fri Jun 8 21:14:23 2007 New Revision: 55834 Modified: python/trunk/Modules/_ctypes/libffi/src/x86/ffi.c python/trunk/Modules/_ctypes/libffi/src/x86/ffi64.c Log: Fix warnings by using proper function prototype. Modified: python/trunk/Modules/_ctypes/libffi/src/x86/ffi.c ============================================================================== --- python/trunk/Modules/_ctypes/libffi/src/x86/ffi.c (original) +++ python/trunk/Modules/_ctypes/libffi/src/x86/ffi.c Fri Jun 8 21:14:23 2007 @@ -174,7 +174,7 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); /*@=declundef@*/ /*@=exportheader@*/ @@ -185,13 +185,13 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); /*@=declundef@*/ /*@=exportheader@*/ #endif /* X86_WIN32 */ void ffi_call(/*@dependent@*/ ffi_cif *cif, - void (*fn)(), + void (*fn)(void), /*@out@*/ void *rvalue, /*@dependent@*/ void **avalue) { @@ -405,7 +405,7 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); #ifdef X86_WIN32 extern void @@ -413,12 +413,12 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); #endif /* X86_WIN32 */ void ffi_raw_call(/*@dependent@*/ ffi_cif *cif, - void (*fn)(), + void (*fn)(void), /*@out@*/ void *rvalue, /*@dependent@*/ ffi_raw *fake_avalue) { Modified: python/trunk/Modules/_ctypes/libffi/src/x86/ffi64.c ============================================================================== --- python/trunk/Modules/_ctypes/libffi/src/x86/ffi64.c (original) +++ python/trunk/Modules/_ctypes/libffi/src/x86/ffi64.c Fri Jun 8 21:14:23 2007 @@ -42,7 +42,7 @@ }; extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags, - void *raddr, void (*fnaddr)(), unsigned ssecount); + void *raddr, void (*fnaddr)(void), unsigned ssecount); /* All reference to register classes here is identical to the code in gcc/config/i386/i386.c. Do *not* change one without the other. */ @@ -339,7 +339,7 @@ } void -ffi_call (ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) +ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) { enum x86_64_reg_class classes[MAX_CLASSES]; char *stack, *argp; From python-checkins at python.org Fri Jun 8 21:19:26 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 21:19:26 +0200 (CEST) Subject: [Python-checkins] r55835 - python/branches/release25-maint/Doc/lib/libctypes.tex Message-ID: <20070608191926.B6F421E4004@bag.python.org> Author: thomas.heller Date: Fri Jun 8 21:19:24 2007 New Revision: 55835 Modified: python/branches/release25-maint/Doc/lib/libctypes.tex Log: Fix wrong documentation, and correct the punktuation. Closes [1700455]. Backported from trunk. Modified: python/branches/release25-maint/Doc/lib/libctypes.tex ============================================================================== --- python/branches/release25-maint/Doc/lib/libctypes.tex (original) +++ python/branches/release25-maint/Doc/lib/libctypes.tex Fri Jun 8 21:19:24 2007 @@ -437,8 +437,8 @@ expecting pointers to mutable memory. If you need mutable memory blocks, ctypes has a \code{create{\_}string{\_}buffer} function which creates these in various ways. The current memory block contents can be -accessed (or changed) with the \code{raw} property, if you want to access -it as NUL terminated string, use the \code{string} property: +accessed (or changed) with the \code{raw} property; if you want to access +it as NUL terminated string, use the \code{value} property: \begin{verbatim} >>> from ctypes import * >>> p = create_string_buffer(3) # create a 3 byte buffer, initialized to NUL bytes From python-checkins at python.org Fri Jun 8 21:39:43 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 8 Jun 2007 21:39:43 +0200 (CEST) Subject: [Python-checkins] r55836 - in python/branches/release25-maint: Lib/ctypes Lib/ctypes/test/test_loading.py Misc/NEWS Modules/_ctypes Modules/_ctypes/callproc.c Modules/_ctypes/ctypes.h Message-ID: <20070608193943.5EB8F1E4004@bag.python.org> Author: thomas.heller Date: Fri Jun 8 21:39:31 2007 New Revision: 55836 Modified: python/branches/release25-maint/Lib/ctypes/ (props changed) python/branches/release25-maint/Lib/ctypes/test/test_loading.py python/branches/release25-maint/Misc/NEWS python/branches/release25-maint/Modules/_ctypes/ (props changed) python/branches/release25-maint/Modules/_ctypes/callproc.c python/branches/release25-maint/Modules/_ctypes/ctypes.h Log: Merged revisions 55129-55131 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk/Lib/ctypes ........ r55129 | thomas.heller | 2007-05-04 21:54:22 +0200 (Fr, 04 Mai 2007) | 3 lines Do not truncate 64-bit pointers to 32-bit integers. Fixes SF #1703286, will backport to release25-maint. ........ r55131 | thomas.heller | 2007-05-04 21:56:32 +0200 (Fr, 04 Mai 2007) | 1 line Oops, these tests do not run on Windows CE. ........ Modified: python/branches/release25-maint/Lib/ctypes/test/test_loading.py ============================================================================== --- python/branches/release25-maint/Lib/ctypes/test/test_loading.py (original) +++ python/branches/release25-maint/Lib/ctypes/test/test_loading.py Fri Jun 8 21:39:31 2007 @@ -74,5 +74,33 @@ self.failUnlessRaises(AttributeError, dll.__getitem__, 1234) + if os.name == "nt": + def test_1703286_A(self): + from _ctypes import LoadLibrary, FreeLibrary + # On winXP 64-bit, advapi32 loads at an address that does + # NOT fit into a 32-bit integer. FreeLibrary must be able + # to accept this address. + + # These are tests for http://www.python.org/sf/1703286 + handle = LoadLibrary("advapi32") + FreeLibrary(handle) + + def test_1703286_B(self): + # Since on winXP 64-bit advapi32 loads like described + # above, the (arbitrarily selected) CloseEventLog function + # also has a high address. 'call_function' should accept + # addresses so large. + from _ctypes import call_function + advapi32 = windll.advapi32 + # Calling CloseEventLog with a NULL argument should fail, + # but the call should not segfault or so. + self.failUnlessEqual(0, advapi32.CloseEventLog(None)) + windll.kernel32.GetProcAddress.argtypes = c_void_p, c_char_p + windll.kernel32.GetProcAddress.restype = c_void_p + proc = windll.kernel32.GetProcAddress(advapi32._handle, "CloseEventLog") + self.failUnless(proc) + # This is the real test: call the function via 'call_function' + self.failUnlessEqual(0, call_function(proc, (None,))) + if __name__ == "__main__": unittest.main() Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Fri Jun 8 21:39:31 2007 @@ -54,6 +54,8 @@ Extension Modules ----------------- +- Bug #1703286: ctypes no longer truncates 64-bit pointers. + - Bug #1721309: prevent bsddb module from freeing random memory. - Bug #1726026: Correct the field names of WIN32_FIND_DATAA and Modified: python/branches/release25-maint/Modules/_ctypes/callproc.c ============================================================================== --- python/branches/release25-maint/Modules/_ctypes/callproc.c (original) +++ python/branches/release25-maint/Modules/_ctypes/callproc.c Fri Jun 8 21:39:31 2007 @@ -1111,10 +1111,10 @@ Free the handle of an executable previously loaded by LoadLibrary.\n"; static PyObject *free_library(PyObject *self, PyObject *args) { - HMODULE hMod; - if (!PyArg_ParseTuple(args, "i:FreeLibrary", &hMod)) + void *hMod; + if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":FreeLibrary", &hMod)) return NULL; - if (!FreeLibrary(hMod)) + if (!FreeLibrary((HMODULE)hMod)) return PyErr_SetFromWindowsErr(GetLastError()); Py_INCREF(Py_None); return Py_None; @@ -1233,9 +1233,9 @@ static PyObject *py_dl_close(PyObject *self, PyObject *args) { - void * handle; + void *handle; - if (!PyArg_ParseTuple(args, "i:dlclose", &handle)) + if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":dlclose", &handle)) return NULL; if (dlclose(handle)) { PyErr_SetString(PyExc_OSError, @@ -1252,7 +1252,7 @@ void *handle; void *ptr; - if (!PyArg_ParseTuple(args, "is:dlsym", &handle, &name)) + if (!PyArg_ParseTuple(args, PY_VOID_P_CODE "s:dlsym", &handle, &name)) return NULL; ptr = ctypes_dlsym(handle, name); if (!ptr) { @@ -1260,7 +1260,7 @@ ctypes_dlerror()); return NULL; } - return Py_BuildValue("i", ptr); + return PyLong_FromVoidPtr(ptr); } #endif @@ -1272,12 +1272,12 @@ static PyObject * call_function(PyObject *self, PyObject *args) { - PPROC func; + void *func; PyObject *arguments; PyObject *result; if (!PyArg_ParseTuple(args, - "iO!", + PY_VOID_P_CODE "O!", &func, &PyTuple_Type, &arguments)) return NULL; @@ -1303,12 +1303,12 @@ static PyObject * call_cdeclfunction(PyObject *self, PyObject *args) { - PPROC func; + void *func; PyObject *arguments; PyObject *result; if (!PyArg_ParseTuple(args, - "iO!", + PY_VOID_P_CODE "O!", &func, &PyTuple_Type, &arguments)) return NULL; Modified: python/branches/release25-maint/Modules/_ctypes/ctypes.h ============================================================================== --- python/branches/release25-maint/Modules/_ctypes/ctypes.h (original) +++ python/branches/release25-maint/Modules/_ctypes/ctypes.h Fri Jun 8 21:39:31 2007 @@ -23,6 +23,12 @@ #define PY_LONG_LONG LONG_LONG #endif +#if SIZEOF_VOID_P == SIZEOF_LONG +#define PY_VOID_P_CODE "k" +#elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P == SIZEOF_LONG_LONG) +#define PY_VOID_P_CODE "K" +#endif + typedef struct tagPyCArgObject PyCArgObject; typedef struct tagCDataObject CDataObject; typedef PyObject *(* GETFUNC)(void *, unsigned size); From nnorwitz at gmail.com Fri Jun 8 23:08:35 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 8 Jun 2007 17:08:35 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070608210835.GA28178@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Sat Jun 9 05:36:59 2007 From: python-checkins at python.org (neal.norwitz) Date: Sat, 9 Jun 2007 05:36:59 +0200 (CEST) Subject: [Python-checkins] r55839 - in python/trunk: Lib/test/test_str.py Lib/test/test_unicode.py Misc/NEWS Objects/stringobject.c Objects/unicodeobject.c Message-ID: <20070609033659.B73591E4004@bag.python.org> Author: neal.norwitz Date: Sat Jun 9 05:36:34 2007 New Revision: 55839 Modified: python/trunk/Lib/test/test_str.py python/trunk/Lib/test/test_unicode.py python/trunk/Misc/NEWS python/trunk/Objects/stringobject.c python/trunk/Objects/unicodeobject.c Log: Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. Found by Google. It would be good for people to review this especially carefully and verify I don't have an off by one error and there is no other way to cause overflow. Modified: python/trunk/Lib/test/test_str.py ============================================================================== --- python/trunk/Lib/test/test_str.py (original) +++ python/trunk/Lib/test/test_str.py Sat Jun 9 05:36:34 2007 @@ -1,4 +1,6 @@ + import unittest +import sys from test import test_support, string_tests @@ -82,6 +84,15 @@ self.assertEqual(str(Foo9("foo")), "string") self.assertEqual(unicode(Foo9("foo")), u"not unicode") + def test_expandtabs_overflows_gracefully(self): + # This test only affects 32-bit platforms because expandtabs can only take + # an int as the max value, not a 64-bit C long. If expandtabs is changed + # to take a 64-bit long, this test should apply to all platforms. + if sys.maxint > (1 << 32): + return + self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint) + + def test_main(): test_support.run_unittest(StrTest) Modified: python/trunk/Lib/test/test_unicode.py ============================================================================== --- python/trunk/Lib/test/test_unicode.py (original) +++ python/trunk/Lib/test/test_unicode.py Sat Jun 9 05:36:34 2007 @@ -817,8 +817,13 @@ self.assertEqual(repr(s1()), '\\n') self.assertEqual(repr(s2()), '\\n') - - + def test_expandtabs_overflows_gracefully(self): + # This test only affects 32-bit platforms because expandtabs can only take + # an int as the max value, not a 64-bit C long. If expandtabs is changed + # to take a 64-bit long, this test should apply to all platforms. + if sys.maxint > (1 << 32): + return + self.assertRaises(OverflowError, u't\tt\t'.expandtabs, sys.maxint) def test_main(): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jun 9 05:36:34 2007 @@ -12,6 +12,9 @@ Core and builtins ----------------- +- Prevent expandtabs() on string and unicode objects from causing a segfault when + a large width is passed on 32-bit platforms. + - Bug #1733488: Fix compilation of bufferobject.c on AIX. - Bug #1722485: remove docstrings again when running with -OO. Modified: python/trunk/Objects/stringobject.c ============================================================================== --- python/trunk/Objects/stringobject.c (original) +++ python/trunk/Objects/stringobject.c Sat Jun 9 05:36:34 2007 @@ -3307,7 +3307,7 @@ { const char *e, *p; char *q; - Py_ssize_t i, j; + Py_ssize_t i, j, old_j; PyObject *u; int tabsize = 8; @@ -3315,12 +3315,18 @@ return NULL; /* First pass: determine size of output string */ - i = j = 0; + i = j = old_j = 0; e = PyString_AS_STRING(self) + PyString_GET_SIZE(self); for (p = PyString_AS_STRING(self); p < e; p++) if (*p == '\t') { - if (tabsize > 0) + if (tabsize > 0) { j += tabsize - (j % tabsize); + if (old_j > j) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + old_j = j; + } } else { j++; @@ -3330,6 +3336,11 @@ } } + if ((i + j) < 0) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + /* Second pass: create output string and fill it */ u = PyString_FromStringAndSize(NULL, i + j); if (!u) Modified: python/trunk/Objects/unicodeobject.c ============================================================================== --- python/trunk/Objects/unicodeobject.c (original) +++ python/trunk/Objects/unicodeobject.c Sat Jun 9 05:36:34 2007 @@ -5690,7 +5690,7 @@ Py_UNICODE *e; Py_UNICODE *p; Py_UNICODE *q; - Py_ssize_t i, j; + Py_ssize_t i, j, old_j; PyUnicodeObject *u; int tabsize = 8; @@ -5698,12 +5698,18 @@ return NULL; /* First pass: determine size of output string */ - i = j = 0; + i = j = old_j = 0; e = self->str + self->length; for (p = self->str; p < e; p++) if (*p == '\t') { - if (tabsize > 0) + if (tabsize > 0) { j += tabsize - (j % tabsize); + if (old_j > j) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + old_j = j; + } } else { j++; @@ -5713,6 +5719,11 @@ } } + if ((i + j) < 0) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + /* Second pass: create output string and fill it */ u = _PyUnicode_New(i + j); if (!u) From python-checkins at python.org Sat Jun 9 06:06:37 2007 From: python-checkins at python.org (neal.norwitz) Date: Sat, 9 Jun 2007 06:06:37 +0200 (CEST) Subject: [Python-checkins] r55840 - in python/branches/release25-maint: Lib/test/test_str.py Lib/test/test_unicode.py Misc/NEWS Objects/stringobject.c Objects/unicodeobject.c Message-ID: <20070609040637.953D51E4004@bag.python.org> Author: neal.norwitz Date: Sat Jun 9 06:06:30 2007 New Revision: 55840 Modified: python/branches/release25-maint/Lib/test/test_str.py python/branches/release25-maint/Lib/test/test_unicode.py python/branches/release25-maint/Misc/NEWS python/branches/release25-maint/Objects/stringobject.c python/branches/release25-maint/Objects/unicodeobject.c Log: Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. Found by Google. It would be good for people to review this especially carefully and verify I don't have an off by one error and there is no other way to cause overflow. Modified: python/branches/release25-maint/Lib/test/test_str.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_str.py (original) +++ python/branches/release25-maint/Lib/test/test_str.py Sat Jun 9 06:06:30 2007 @@ -1,4 +1,6 @@ + import unittest +import sys from test import test_support, string_tests @@ -82,6 +84,15 @@ self.assertEqual(str(Foo9("foo")), "string") self.assertEqual(unicode(Foo9("foo")), u"not unicode") + def test_expandtabs_overflows_gracefully(self): + # This test only affects 32-bit platforms because expandtabs can only take + # an int as the max value, not a 64-bit C long. If expandtabs is changed + # to take a 64-bit long, this test should apply to all platforms. + if sys.maxint > (1 << 32): + return + self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint) + + def test_main(): test_support.run_unittest(StrTest) Modified: python/branches/release25-maint/Lib/test/test_unicode.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_unicode.py (original) +++ python/branches/release25-maint/Lib/test/test_unicode.py Sat Jun 9 06:06:30 2007 @@ -817,8 +817,13 @@ self.assertEqual(repr(s1()), '\\n') self.assertEqual(repr(s2()), '\\n') - - + def test_expandtabs_overflows_gracefully(self): + # This test only affects 32-bit platforms because expandtabs can only take + # an int as the max value, not a 64-bit C long. If expandtabs is changed + # to take a 64-bit long, this test should apply to all platforms. + if sys.maxint > (1 << 32): + return + self.assertRaises(OverflowError, u't\tt\t'.expandtabs, sys.maxint) def test_main(): Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Sat Jun 9 06:06:30 2007 @@ -12,6 +12,9 @@ Core and builtins ----------------- +- Prevent expandtabs() on string and unicode objects from causing a segfault when + a large width is passed on 32-bit platforms. + - Bug #1733488: Fix compilation of bufferobject.c on AIX. Modified: python/branches/release25-maint/Objects/stringobject.c ============================================================================== --- python/branches/release25-maint/Objects/stringobject.c (original) +++ python/branches/release25-maint/Objects/stringobject.c Sat Jun 9 06:06:30 2007 @@ -3298,7 +3298,7 @@ { const char *e, *p; char *q; - Py_ssize_t i, j; + Py_ssize_t i, j, old_j; PyObject *u; int tabsize = 8; @@ -3306,12 +3306,18 @@ return NULL; /* First pass: determine size of output string */ - i = j = 0; + i = j = old_j = 0; e = PyString_AS_STRING(self) + PyString_GET_SIZE(self); for (p = PyString_AS_STRING(self); p < e; p++) if (*p == '\t') { - if (tabsize > 0) + if (tabsize > 0) { j += tabsize - (j % tabsize); + if (old_j > j) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + old_j = j; + } } else { j++; @@ -3321,6 +3327,11 @@ } } + if ((i + j) < 0) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + /* Second pass: create output string and fill it */ u = PyString_FromStringAndSize(NULL, i + j); if (!u) Modified: python/branches/release25-maint/Objects/unicodeobject.c ============================================================================== --- python/branches/release25-maint/Objects/unicodeobject.c (original) +++ python/branches/release25-maint/Objects/unicodeobject.c Sat Jun 9 06:06:30 2007 @@ -5686,7 +5686,7 @@ Py_UNICODE *e; Py_UNICODE *p; Py_UNICODE *q; - Py_ssize_t i, j; + Py_ssize_t i, j, old_j; PyUnicodeObject *u; int tabsize = 8; @@ -5694,12 +5694,18 @@ return NULL; /* First pass: determine size of output string */ - i = j = 0; + i = j = old_j = 0; e = self->str + self->length; for (p = self->str; p < e; p++) if (*p == '\t') { - if (tabsize > 0) + if (tabsize > 0) { j += tabsize - (j % tabsize); + if (old_j > j) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + old_j = j; + } } else { j++; @@ -5709,6 +5715,11 @@ } } + if ((i + j) < 0) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + /* Second pass: create output string and fill it */ u = _PyUnicode_New(i + j); if (!u) From buildbot at python.org Sat Jun 9 06:36:02 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 04:36:02 +0000 Subject: [Python-checkins] buildbot warnings in x86 W2k 2.5 Message-ID: <20070609043603.46E6C1E4006@bag.python.org> The Buildbot has detected a new failure of x86 W2k 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520W2k%25202.5/builds/127 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_urllibnet sincerely, -The Buildbot From python-checkins at python.org Sat Jun 9 06:48:27 2007 From: python-checkins at python.org (neal.norwitz) Date: Sat, 9 Jun 2007 06:48:27 +0200 (CEST) Subject: [Python-checkins] r55841 - python/trunk/Python/peephole.c Message-ID: <20070609044827.8429B1E4004@bag.python.org> Author: neal.norwitz Date: Sat Jun 9 06:48:22 2007 New Revision: 55841 Modified: python/trunk/Python/peephole.c Log: Use macro version of GET_SIZE to avoid Coverity warning (#150) about a possible error. Modified: python/trunk/Python/peephole.c ============================================================================== --- python/trunk/Python/peephole.c (original) +++ python/trunk/Python/peephole.c Sat Jun 9 06:48:22 2007 @@ -308,7 +308,7 @@ /* Avoid situations where jump retargeting could overflow */ assert(PyString_Check(code)); - codelen = PyString_Size(code); + codelen = PyString_GET_SIZE(code); if (codelen > 32700) goto exitUnchanged; From python-checkins at python.org Sat Jun 9 09:42:54 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sat, 9 Jun 2007 09:42:54 +0200 (CEST) Subject: [Python-checkins] r55842 - in python/trunk: Include/pyport.h Lib/test/test_structmembers.py Misc/NEWS Modules/_testcapimodule.c PC/pyconfig.h Python/structmember.c Message-ID: <20070609074254.435A61E4004@bag.python.org> Author: martin.v.loewis Date: Sat Jun 9 09:42:52 2007 New Revision: 55842 Modified: python/trunk/Include/pyport.h python/trunk/Lib/test/test_structmembers.py python/trunk/Misc/NEWS python/trunk/Modules/_testcapimodule.c python/trunk/PC/pyconfig.h python/trunk/Python/structmember.c Log: Patch #1733960: Allow T_LONGLONG to accept ints. Will backport to 2.5. Modified: python/trunk/Include/pyport.h ============================================================================== --- python/trunk/Include/pyport.h (original) +++ python/trunk/Include/pyport.h Sat Jun 9 09:42:52 2007 @@ -61,6 +61,9 @@ #ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long +#define PY_LLONG_MIN LLONG_MIN +#define PY_LLONG_MAX LLONG_MAX +#define PY_ULLONG_MAX ULLONG_MAX #endif #endif /* HAVE_LONG_LONG */ Modified: python/trunk/Lib/test/test_structmembers.py ============================================================================== --- python/trunk/Lib/test/test_structmembers.py (original) +++ python/trunk/Lib/test/test_structmembers.py Sat Jun 9 09:42:52 2007 @@ -2,7 +2,8 @@ CHAR_MAX, CHAR_MIN, UCHAR_MAX, \ SHRT_MAX, SHRT_MIN, USHRT_MAX, \ INT_MAX, INT_MIN, UINT_MAX, \ - LONG_MAX, LONG_MIN, ULONG_MAX + LONG_MAX, LONG_MIN, ULONG_MAX, \ + LLONG_MAX, LLONG_MIN, ULLONG_MAX import warnings, exceptions, unittest from test import test_support @@ -39,6 +40,23 @@ ts.T_ULONG=ULONG_MAX self.assertEquals(ts.T_ULONG, ULONG_MAX) + ## T_LONGLONG and T_ULONGLONG may not be present on some platforms + if hasattr(ts, 'T_LONGLONG'): + ts.T_LONGLONG=LLONG_MAX + self.assertEquals(ts.T_LONGLONG, LLONG_MAX) + ts.T_LONGLONG=LLONG_MIN + self.assertEquals(ts.T_LONGLONG, LLONG_MIN) + + ts.T_ULONGLONG=ULLONG_MAX + self.assertEquals(ts.T_ULONGLONG, ULLONG_MAX) + + ## make sure these will accept a plain int as well as a long + ts.T_LONGLONG=3 + self.assertEquals(ts.T_LONGLONG, 3) + ts.T_ULONGLONG=4 + self.assertEquals(ts.T_ULONGLONG, 4) + + class TestWarnings(unittest.TestCase): def has_warned(self, w): self.assert_(w.category is RuntimeWarning) Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Sat Jun 9 09:42:52 2007 @@ -12,6 +12,8 @@ Core and builtins ----------------- +- Patch #1733960: Allow T_LONGLONG to accept ints. + - Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. Modified: python/trunk/Modules/_testcapimodule.c ============================================================================== --- python/trunk/Modules/_testcapimodule.c (original) +++ python/trunk/Modules/_testcapimodule.c Sat Jun 9 09:42:52 2007 @@ -772,6 +772,10 @@ unsigned long ulong_member; float float_member; double double_member; +#ifdef HAVE_LONG_LONG + PY_LONG_LONG longlong_member; + unsigned PY_LONG_LONG ulonglong_member; +#endif } all_structmembers; typedef struct { @@ -790,23 +794,40 @@ {"T_ULONG", T_ULONG, offsetof(test_structmembers, structmembers.ulong_member), 0, NULL}, {"T_FLOAT", T_FLOAT, offsetof(test_structmembers, structmembers.float_member), 0, NULL}, {"T_DOUBLE", T_DOUBLE, offsetof(test_structmembers, structmembers.double_member), 0, NULL}, +#ifdef HAVE_LONG_LONG + {"T_LONGLONG", T_LONGLONG, offsetof(test_structmembers, structmembers.longlong_member), 0, NULL}, + {"T_ULONGLONG", T_ULONGLONG, offsetof(test_structmembers, structmembers.ulonglong_member), 0, NULL}, +#endif {NULL} }; static PyObject *test_structmembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs){ static char *keywords[]={"T_BYTE", "T_UBYTE", "T_SHORT", "T_USHORT", "T_INT", "T_UINT", - "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", NULL}; + "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", + #ifdef HAVE_LONG_LONG + "T_LONGLONG", "T_ULONGLONG", + #endif + NULL}; + static char *fmt="|bBhHiIlkfd" + #ifdef HAVE_LONG_LONG + "LK" + #endif + ; test_structmembers *ob=PyObject_New(test_structmembers, type); if (ob==NULL) return NULL; memset(&ob->structmembers, 0, sizeof(all_structmembers)); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|bBhHiIlkfd", keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, fmt, keywords, &ob->structmembers.byte_member, &ob->structmembers.ubyte_member, &ob->structmembers.short_member, &ob->structmembers.ushort_member, &ob->structmembers.int_member, &ob->structmembers.uint_member, &ob->structmembers.long_member, &ob->structmembers.ulong_member, - &ob->structmembers.float_member, &ob->structmembers.double_member)){ + &ob->structmembers.float_member, &ob->structmembers.double_member + #ifdef HAVE_LONG_LONG + ,&ob->structmembers.longlong_member, &ob->structmembers.ulonglong_member + #endif + )){ Py_DECREF(ob); return NULL; } @@ -889,6 +910,9 @@ PyModule_AddObject(m, "FLT_MIN", PyFloat_FromDouble(FLT_MIN)); PyModule_AddObject(m, "DBL_MAX", PyFloat_FromDouble(DBL_MAX)); PyModule_AddObject(m, "DBL_MIN", PyFloat_FromDouble(DBL_MIN)); + PyModule_AddObject(m, "LLONG_MAX", PyLong_FromLongLong(PY_LLONG_MAX)); + PyModule_AddObject(m, "LLONG_MIN", PyLong_FromLongLong(PY_LLONG_MIN)); + PyModule_AddObject(m, "ULLONG_MAX", PyLong_FromUnsignedLongLong(PY_ULLONG_MAX)); PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyInt_FromSsize_t(PY_SSIZE_T_MAX)); PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyInt_FromSsize_t(PY_SSIZE_T_MIN)); Modified: python/trunk/PC/pyconfig.h ============================================================================== --- python/trunk/PC/pyconfig.h (original) +++ python/trunk/PC/pyconfig.h Sat Jun 9 09:42:52 2007 @@ -247,6 +247,9 @@ #define COMPILER "[gcc]" #define hypot _hypot #define PY_LONG_LONG long long +#define PY_LLONG_MIN LLONG_MIN +#define PY_LLONG_MAX LLONG_MAX +#define PY_ULLONG_MAX ULLONG_MAX #endif /* GNUC */ /* ------------------------------------------------------------------------*/ @@ -272,6 +275,9 @@ #define HAVE_LONG_LONG 1 #ifndef PY_LONG_LONG # define PY_LONG_LONG __int64 +# define PY_LLONG_MAX LLONG_MAX +# define PY_LLONG_MIN LLONG_MIN +# define PY_ULLONG_MIN ULLONG_MIN #endif /* For Windows the Python core is in a DLL by default. Test Modified: python/trunk/Python/structmember.c ============================================================================== --- python/trunk/Python/structmember.c (original) +++ python/trunk/Python/structmember.c Sat Jun 9 09:42:52 2007 @@ -293,31 +293,25 @@ } break; #ifdef HAVE_LONG_LONG - case T_LONGLONG: - if (!PyLong_Check(v)) { - PyErr_BadArgument(); + case T_LONGLONG:{ + PY_LONG_LONG value; + *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v); + if ((value == -1) && PyErr_Occurred()) return -1; - } else { - PY_LONG_LONG value; - *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v); - if ((value == -1) && PyErr_Occurred()) { - return -1; - } - } - break; - case T_ULONGLONG: - if (!PyLong_Check(v)) { - PyErr_BadArgument(); - return -1; - } else { - unsigned PY_LONG_LONG value; - *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v); - if ((value == (unsigned PY_LONG_LONG)-1) && - PyErr_Occurred()) { - return -1; - } - } - break; + break; + } + case T_ULONGLONG:{ + unsigned PY_LONG_LONG value; + /* ??? PyLong_AsLongLong accepts an int, but PyLong_AsUnsignedLongLong + doesn't ??? */ + if (PyLong_Check(v)) + *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v); + else + *(unsigned PY_LONG_LONG*)addr = value = PyInt_AsLong(v); + if ((value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred()) + return -1; + break; + } #endif /* HAVE_LONG_LONG */ default: PyErr_Format(PyExc_SystemError, From buildbot at python.org Sat Jun 9 09:49:43 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 07:49:43 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-3 trunk Message-ID: <20070609074943.F15C51E400B@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%2520trunk/builds/36 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis BUILD FAILED: failed svn sincerely, -The Buildbot From buildbot at python.org Sat Jun 9 09:50:10 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 07:50:10 +0000 Subject: [Python-checkins] buildbot failure in x86 W2k trunk Message-ID: <20070609075010.E9A4A1E4010@bag.python.org> The Buildbot has detected a new failure of x86 W2k trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520W2k%2520trunk/builds/351 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis BUILD FAILED: failed compile sincerely, -The Buildbot From python-checkins at python.org Sat Jun 9 09:58:07 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sat, 9 Jun 2007 09:58:07 +0200 (CEST) Subject: [Python-checkins] r55843 - python/trunk/PC/pyconfig.h Message-ID: <20070609075807.C7D921E4004@bag.python.org> Author: martin.v.loewis Date: Sat Jun 9 09:58:05 2007 New Revision: 55843 Modified: python/trunk/PC/pyconfig.h Log: Fix Windows build. Modified: python/trunk/PC/pyconfig.h ============================================================================== --- python/trunk/PC/pyconfig.h (original) +++ python/trunk/PC/pyconfig.h Sat Jun 9 09:58:05 2007 @@ -277,7 +277,7 @@ # define PY_LONG_LONG __int64 # define PY_LLONG_MAX LLONG_MAX # define PY_LLONG_MIN LLONG_MIN -# define PY_ULLONG_MIN ULLONG_MIN +# define PY_ULLONG_MAX ULLONG_MAX #endif /* For Windows the Python core is in a DLL by default. Test From python-checkins at python.org Sat Jun 9 10:01:34 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sat, 9 Jun 2007 10:01:34 +0200 (CEST) Subject: [Python-checkins] r55844 - in python/branches/release25-maint: Include/pyport.h Lib/test/test_structmembers.py Misc/NEWS Modules/_testcapimodule.c PC/pyconfig.h Python/structmember.c Message-ID: <20070609080134.531321E4004@bag.python.org> Author: martin.v.loewis Date: Sat Jun 9 10:01:33 2007 New Revision: 55844 Modified: python/branches/release25-maint/Include/pyport.h python/branches/release25-maint/Lib/test/test_structmembers.py python/branches/release25-maint/Misc/NEWS python/branches/release25-maint/Modules/_testcapimodule.c python/branches/release25-maint/PC/pyconfig.h python/branches/release25-maint/Python/structmember.c Log: Patch #1733960: Allow T_LONGLONG to accept ints. Modified: python/branches/release25-maint/Include/pyport.h ============================================================================== --- python/branches/release25-maint/Include/pyport.h (original) +++ python/branches/release25-maint/Include/pyport.h Sat Jun 9 10:01:33 2007 @@ -61,6 +61,9 @@ #ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long +#define PY_LLONG_MIN LLONG_MIN +#define PY_LLONG_MAX LLONG_MAX +#define PY_ULLONG_MAX ULLONG_MAX #endif #endif /* HAVE_LONG_LONG */ Modified: python/branches/release25-maint/Lib/test/test_structmembers.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_structmembers.py (original) +++ python/branches/release25-maint/Lib/test/test_structmembers.py Sat Jun 9 10:01:33 2007 @@ -2,7 +2,8 @@ CHAR_MAX, CHAR_MIN, UCHAR_MAX, \ SHRT_MAX, SHRT_MIN, USHRT_MAX, \ INT_MAX, INT_MIN, UINT_MAX, \ - LONG_MAX, LONG_MIN, ULONG_MAX + LONG_MAX, LONG_MIN, ULONG_MAX, \ + LLONG_MAX, LLONG_MIN, ULLONG_MAX import warnings, exceptions, unittest, test.test_warnings from test import test_support @@ -39,6 +40,24 @@ ts.T_ULONG=ULONG_MAX self.assertEquals(ts.T_ULONG, ULONG_MAX) + ## T_LONGLONG and T_ULONGLONG may not be present on some platforms + if hasattr(ts, 'T_LONGLONG'): + ts.T_LONGLONG=LLONG_MAX + self.assertEquals(ts.T_LONGLONG, LLONG_MAX) + ts.T_LONGLONG=LLONG_MIN + self.assertEquals(ts.T_LONGLONG, LLONG_MIN) + + ts.T_ULONGLONG=ULLONG_MAX + self.assertEquals(ts.T_ULONGLONG, ULLONG_MAX) + + ## make sure these will accept a plain int as well as a long + ts.T_LONGLONG=3 + self.assertEquals(ts.T_LONGLONG, 3) + ts.T_ULONGLONG=4 + self.assertEquals(ts.T_ULONGLONG, 4) + + + def test_main(verbose=None): test_support.run_unittest( ReadWriteTests Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Sat Jun 9 10:01:33 2007 @@ -12,6 +12,8 @@ Core and builtins ----------------- +- Patch #1733960: Allow T_LONGLONG to accept ints. + - Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. Modified: python/branches/release25-maint/Modules/_testcapimodule.c ============================================================================== --- python/branches/release25-maint/Modules/_testcapimodule.c (original) +++ python/branches/release25-maint/Modules/_testcapimodule.c Sat Jun 9 10:01:33 2007 @@ -772,6 +772,10 @@ unsigned long ulong_member; float float_member; double double_member; +#ifdef HAVE_LONG_LONG + PY_LONG_LONG longlong_member; + unsigned PY_LONG_LONG ulonglong_member; +#endif } all_structmembers; typedef struct { @@ -790,23 +794,40 @@ {"T_ULONG", T_ULONG, offsetof(test_structmembers, structmembers.ulong_member), 0, NULL}, {"T_FLOAT", T_FLOAT, offsetof(test_structmembers, structmembers.float_member), 0, NULL}, {"T_DOUBLE", T_DOUBLE, offsetof(test_structmembers, structmembers.double_member), 0, NULL}, +#ifdef HAVE_LONG_LONG + {"T_LONGLONG", T_LONGLONG, offsetof(test_structmembers, structmembers.longlong_member), 0, NULL}, + {"T_ULONGLONG", T_ULONGLONG, offsetof(test_structmembers, structmembers.ulonglong_member), 0, NULL}, +#endif {NULL} }; static PyObject *test_structmembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs){ static char *keywords[]={"T_BYTE", "T_UBYTE", "T_SHORT", "T_USHORT", "T_INT", "T_UINT", - "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", NULL}; + "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", + #ifdef HAVE_LONG_LONG + "T_LONGLONG", "T_ULONGLONG", + #endif + NULL}; + static char *fmt="|bBhHiIlkfd" + #ifdef HAVE_LONG_LONG + "LK" + #endif + ; test_structmembers *ob=PyObject_New(test_structmembers, type); if (ob==NULL) return NULL; memset(&ob->structmembers, 0, sizeof(all_structmembers)); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|bBhHiIlkfd", keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, fmt, keywords, &ob->structmembers.byte_member, &ob->structmembers.ubyte_member, &ob->structmembers.short_member, &ob->structmembers.ushort_member, &ob->structmembers.int_member, &ob->structmembers.uint_member, &ob->structmembers.long_member, &ob->structmembers.ulong_member, - &ob->structmembers.float_member, &ob->structmembers.double_member)){ + &ob->structmembers.float_member, &ob->structmembers.double_member + #ifdef HAVE_LONG_LONG + ,&ob->structmembers.longlong_member, &ob->structmembers.ulonglong_member + #endif + )){ Py_DECREF(ob); return NULL; } @@ -889,6 +910,9 @@ PyModule_AddObject(m, "FLT_MIN", PyFloat_FromDouble(FLT_MIN)); PyModule_AddObject(m, "DBL_MAX", PyFloat_FromDouble(DBL_MAX)); PyModule_AddObject(m, "DBL_MIN", PyFloat_FromDouble(DBL_MIN)); + PyModule_AddObject(m, "LLONG_MAX", PyLong_FromLongLong(PY_LLONG_MAX)); + PyModule_AddObject(m, "LLONG_MIN", PyLong_FromLongLong(PY_LLONG_MIN)); + PyModule_AddObject(m, "ULLONG_MAX", PyLong_FromUnsignedLongLong(PY_ULLONG_MAX)); PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyInt_FromSsize_t(PY_SSIZE_T_MAX)); PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyInt_FromSsize_t(PY_SSIZE_T_MIN)); Modified: python/branches/release25-maint/PC/pyconfig.h ============================================================================== --- python/branches/release25-maint/PC/pyconfig.h (original) +++ python/branches/release25-maint/PC/pyconfig.h Sat Jun 9 10:01:33 2007 @@ -234,6 +234,9 @@ #define COMPILER "[gcc]" #define hypot _hypot #define PY_LONG_LONG long long +#define PY_LLONG_MIN LLONG_MIN +#define PY_LLONG_MAX LLONG_MAX +#define PY_ULLONG_MAX ULLONG_MAX #endif /* GNUC */ /* ------------------------------------------------------------------------*/ @@ -259,6 +262,9 @@ #define HAVE_LONG_LONG 1 #ifndef PY_LONG_LONG # define PY_LONG_LONG __int64 +# define PY_LLONG_MAX LLONG_MAX +# define PY_LLONG_MIN LLONG_MIN +# define PY_ULLONG_MAX ULLONG_MAX #endif /* For Windows the Python core is in a DLL by default. Test Modified: python/branches/release25-maint/Python/structmember.c ============================================================================== --- python/branches/release25-maint/Python/structmember.c (original) +++ python/branches/release25-maint/Python/structmember.c Sat Jun 9 10:01:33 2007 @@ -277,31 +277,25 @@ } break; #ifdef HAVE_LONG_LONG - case T_LONGLONG: - if (!PyLong_Check(v)) { - PyErr_BadArgument(); + case T_LONGLONG:{ + PY_LONG_LONG value; + *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v); + if ((value == -1) && PyErr_Occurred()) return -1; - } else { - PY_LONG_LONG value; - *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v); - if ((value == -1) && PyErr_Occurred()) { - return -1; - } - } - break; - case T_ULONGLONG: - if (!PyLong_Check(v)) { - PyErr_BadArgument(); - return -1; - } else { - unsigned PY_LONG_LONG value; - *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v); - if ((value == (unsigned PY_LONG_LONG)-1) && - PyErr_Occurred()) { - return -1; - } - } - break; + break; + } + case T_ULONGLONG:{ + unsigned PY_LONG_LONG value; + /* ??? PyLong_AsLongLong accepts an int, but PyLong_AsUnsignedLongLong + doesn't ??? */ + if (PyLong_Check(v)) + *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v); + else + *(unsigned PY_LONG_LONG*)addr = value = PyInt_AsLong(v); + if ((value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred()) + return -1; + break; + } #endif /* HAVE_LONG_LONG */ default: PyErr_Format(PyExc_SystemError, From buildbot at python.org Sat Jun 9 10:10:37 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 08:10:37 +0000 Subject: [Python-checkins] buildbot warnings in x86 gentoo trunk Message-ID: <20070609081037.910901E4004@bag.python.org> The Buildbot has detected a new failure of x86 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520gentoo%2520trunk/builds/2262 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30996, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30996, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/test/test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '0002-0002-0002-0002-0002' Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/test/test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '1001-1001-1001-1001-1001' Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/bsddb/test/test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '2000-2000-2000-2000-2000' 1 test failed: test_exceptions ====================================================================== ERROR: testSettingException (test.test_exceptions.ExceptionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_exceptions.py", line 184, in testSettingException test_capi1() File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/test/test_exceptions.py", line 158, in test_capi1 import _testcapi ImportError: No module named _testcapi make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Sat Jun 9 10:35:44 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 08:35:44 +0000 Subject: [Python-checkins] buildbot warnings in x86 gentoo 2.5 Message-ID: <20070609083545.77C901E4004@bag.python.org> The Buildbot has detected a new failure of x86 gentoo 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520gentoo%25202.5/builds/371 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_exceptions ====================================================================== ERROR: testSettingException (test.test_exceptions.ExceptionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildslave/python-trunk/2.5.norwitz-x86/build/Lib/test/test_exceptions.py", line 183, in testSettingException test_capi1() File "/home/buildslave/python-trunk/2.5.norwitz-x86/build/Lib/test/test_exceptions.py", line 157, in test_capi1 import _testcapi ImportError: No module named _testcapi make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Sat Jun 9 10:44:13 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 08:44:13 +0000 Subject: [Python-checkins] buildbot warnings in S-390 Debian trunk Message-ID: <20070609084413.7C5911E4004@bag.python.org> The Buildbot has detected a new failure of S-390 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/S-390%2520Debian%2520trunk/builds/1004 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_exceptions ====================================================================== ERROR: testSettingException (test.test_exceptions.ExceptionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-s390/build/Lib/test/test_exceptions.py", line 184, in testSettingException test_capi1() File "/home/pybot/buildarea/trunk.klose-debian-s390/build/Lib/test/test_exceptions.py", line 158, in test_capi1 import _testcapi ImportError: No module named _testcapi make: *** [buildbottest] Error 1 sincerely, -The Buildbot From nnorwitz at gmail.com Sat Jun 9 11:30:23 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 9 Jun 2007 05:30:23 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070609093023.GA13628@python.psfb.org> test_popen2 leaked [-26, 26, -26] references, sum=-26 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From buildbot at python.org Sat Jun 9 11:32:50 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 09:32:50 +0000 Subject: [Python-checkins] buildbot warnings in ppc Debian unstable trunk Message-ID: <20070609093250.2FFB11E4004@bag.python.org> The Buildbot has detected a new failure of ppc Debian unstable trunk. Full details are available at: http://www.python.org/dev/buildbot/all/ppc%2520Debian%2520unstable%2520trunk/builds/11 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/pybot/buildarea/trunk.klose-debian-ppc/build/Lib/test/test_ftplib.py", line 13, in server serv.bind(("", 9091)) File "", line 1, in bind error: (98, 'Address already in use') sincerely, -The Buildbot From buildbot at python.org Sat Jun 9 11:39:01 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 09:39:01 +0000 Subject: [Python-checkins] buildbot warnings in S-390 Debian 2.5 Message-ID: <20070609093902.484851E4004@bag.python.org> The Buildbot has detected a new failure of S-390 Debian 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/S-390%2520Debian%25202.5/builds/305 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_exceptions ====================================================================== ERROR: testSettingException (test.test_exceptions.ExceptionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/2.5.klose-debian-s390/build/Lib/test/test_exceptions.py", line 183, in testSettingException test_capi1() File "/home/pybot/buildarea/2.5.klose-debian-s390/build/Lib/test/test_exceptions.py", line 157, in test_capi1 import _testcapi ImportError: No module named _testcapi make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jun 9 12:10:30 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sat, 9 Jun 2007 12:10:30 +0200 (CEST) Subject: [Python-checkins] r55845 - python/trunk/Include/pyport.h Message-ID: <20070609101030.BC8E21E4004@bag.python.org> Author: martin.v.loewis Date: Sat Jun 9 12:10:26 2007 New Revision: 55845 Modified: python/trunk/Include/pyport.h Log: Provide LLONG_MAX for S390. Modified: python/trunk/Include/pyport.h ============================================================================== --- python/trunk/Include/pyport.h (original) +++ python/trunk/Include/pyport.h Sat Jun 9 12:10:26 2007 @@ -61,9 +61,16 @@ #ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long +#if defined(LLONG_MAX) #define PY_LLONG_MIN LLONG_MIN #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX +#elif defined(__s390__) +/* Apparently, S390 Linux has long long, but no LLONG_MAX */ +#define PY_LLONG_MAX 9223372036854775807LL +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#define PY_ULLONG_MAX 18446744073709551615ULL +#endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ From buildbot at python.org Sat Jun 9 13:02:26 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 11:02:26 +0000 Subject: [Python-checkins] buildbot warnings in PPC64 Debian trunk Message-ID: <20070609110226.369BF1E4004@bag.python.org> The Buildbot has detected a new failure of PPC64 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/PPC64%2520Debian%2520trunk/builds/12 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_timeout make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Sat Jun 9 14:57:49 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sat, 9 Jun 2007 14:57:49 +0200 (CEST) Subject: [Python-checkins] r55846 - python/branches/release25-maint/Include/pyport.h Message-ID: <20070609125749.32F1C1E4004@bag.python.org> Author: martin.v.loewis Date: Sat Jun 9 14:57:46 2007 New Revision: 55846 Modified: python/branches/release25-maint/Include/pyport.h Log: Backport r55845: Provide LLONG_MAX for S390. Modified: python/branches/release25-maint/Include/pyport.h ============================================================================== --- python/branches/release25-maint/Include/pyport.h (original) +++ python/branches/release25-maint/Include/pyport.h Sat Jun 9 14:57:46 2007 @@ -61,9 +61,16 @@ #ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long +#if defined(LLONG_MAX) #define PY_LLONG_MIN LLONG_MIN #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX +#elif defined(__s390__) +/* Apparently, S390 Linux has long long, but no LLONG_MAX */ +#define PY_LLONG_MAX 9223372036854775807LL +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#define PY_ULLONG_MAX 18446744073709551615ULL +#endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ From buildbot at python.org Sat Jun 9 15:37:52 2007 From: buildbot at python.org (buildbot at python.org) Date: Sat, 09 Jun 2007 13:37:52 +0000 Subject: [Python-checkins] buildbot warnings in PPC64 Debian 2.5 Message-ID: <20070609133753.186081E4004@bag.python.org> The Buildbot has detected a new failure of PPC64 Debian 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/PPC64%2520Debian%25202.5/builds/7 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_socket_ssl make: *** [buildbottest] Error 1 sincerely, -The Buildbot From nnorwitz at gmail.com Sat Jun 9 23:08:03 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 9 Jun 2007 17:08:03 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070609210803.GA6226@python.psfb.org> test_popen2 leaked [0, 26, -26] references, sum=0 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From nnorwitz at gmail.com Sun Jun 10 11:08:29 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 10 Jun 2007 05:08:29 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070610090829.GA4045@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Sun Jun 10 14:11:21 2007 From: python-checkins at python.org (skip.montanaro) Date: Sun, 10 Jun 2007 14:11:21 +0200 (CEST) Subject: [Python-checkins] r55851 - tracker/instances/python-dev/detectors/spamcheck.py Message-ID: <20070610121121.54B7C1E4008@bag.python.org> Author: skip.montanaro Date: Sun Jun 10 14:11:18 2007 New Revision: 55851 Added: tracker/instances/python-dev/detectors/spamcheck.py (contents, props changed) Log: *completely untested* spam auditor Added: tracker/instances/python-dev/detectors/spamcheck.py ============================================================================== --- (empty file) +++ tracker/instances/python-dev/detectors/spamcheck.py Sun Jun 10 14:11:18 2007 @@ -0,0 +1,40 @@ +""" +spamcheck.py - Auditor that consults a SpamBayes server and scores all form +submissions. Submissions which are deemed to be spam are rejected. For the +time being only reject submissions which are assumed to be spam (score >= +SPAM_CUTOFF). Once a reasonable body of ham and spam submissions have been +built up you can consider whether to also reject unsure submissions (score > +HAM_CUTOFF). The current settings make it less likely that you'll reject +valid submissions at the expense of manual checks to correct spammy items +which snuck by the screen. +""" + +# These must match the xmlrpc_{host,port,path} settings in the SpamBayes +# server config. +HOST = "localhost" +PORT = "8001" +PATH = "/sbrpc" + +# These must match the {ham,spam}_cutoff setting in the SpamBayes server +# config. +HAM_CUTOFF = 0.2 +SPAM_CUTOFF = 0.85 + +import xmlrpclib + +from roundup.exceptions import Reject + +def check_spam(db, cl, nodeid, newvalues): + uri = "http://%s:%s%s" % (HOST, PORT, PATH) + server = xmlrpclb.ServerProxy(uri, verbose=False) + try: + prob = server.score(newvalues, [], {}) + except (socket.error, xmlrpclib.Fault): + pass + else: + if prob >= CUTOFF: + raise Reject + +def init(db): + db.file.audit('create', check_spam) + db.file.audit('set', check_spam) From buildbot at python.org Sun Jun 10 17:47:04 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 15:47:04 +0000 Subject: [Python-checkins] buildbot failure in amd64 XP 2.5 Message-ID: <20070610154704.C94D01E4008@bag.python.org> The Buildbot has detected a new failure of amd64 XP 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520XP%25202.5/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: martin.v.loewis,neal.norwitz BUILD FAILED: failed compile sincerely, -The Buildbot From buildbot at python.org Sun Jun 10 17:57:58 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 15:57:58 +0000 Subject: [Python-checkins] buildbot failure in amd64 XP trunk Message-ID: <20070610155758.91B2B1E4008@bag.python.org> The Buildbot has detected a new failure of amd64 XP trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520XP%2520trunk/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis,neal.norwitz BUILD FAILED: failed compile sincerely, -The Buildbot From python-checkins at python.org Sun Jun 10 17:59:19 2007 From: python-checkins at python.org (thomas.heller) Date: Sun, 10 Jun 2007 17:59:19 +0200 (CEST) Subject: [Python-checkins] r55854 - python/trunk/Tools/buildbot/build-amd64.bat python/trunk/Tools/buildbot/clean-amd64.bat python/trunk/Tools/buildbot/test-amd64.bat Message-ID: <20070610155919.385311E4008@bag.python.org> Author: thomas.heller Date: Sun Jun 10 17:59:17 2007 New Revision: 55854 Added: python/trunk/Tools/buildbot/build-amd64.bat (contents, props changed) python/trunk/Tools/buildbot/clean-amd64.bat (contents, props changed) python/trunk/Tools/buildbot/test-amd64.bat (contents, props changed) Log: First version of build scripts for Windows/AMD64 (no external components are built yet, and 'kill_python' is disabled). Added: python/trunk/Tools/buildbot/build-amd64.bat ============================================================================== --- (empty file) +++ python/trunk/Tools/buildbot/build-amd64.bat Sun Jun 10 17:59:17 2007 @@ -0,0 +1,5 @@ + at rem Used by the buildbot "compile" step. +REM cmd /c Tools\buildbot\external.bat +call "%VS71COMNTOOLS%vsvars32.bat" +REM cmd /q/c Tools\buildbot\kill_python.bat +devenv.com /build ReleaseAMD64 PCbuild\pcbuild.sln Added: python/trunk/Tools/buildbot/clean-amd64.bat ============================================================================== --- (empty file) +++ python/trunk/Tools/buildbot/clean-amd64.bat Sun Jun 10 17:59:17 2007 @@ -0,0 +1,6 @@ + at rem Used by the buildbot "clean" step. +REM call "%VS71COMNTOOLS%vsvars32.bat" +cd PCbuild + at echo Deleting .pyc/.pyo files ... +python.exe rmpyc.py +devenv.com /clean ReleaseAMD64 pcbuild.sln Added: python/trunk/Tools/buildbot/test-amd64.bat ============================================================================== --- (empty file) +++ python/trunk/Tools/buildbot/test-amd64.bat Sun Jun 10 17:59:17 2007 @@ -0,0 +1,3 @@ + at rem Used by the buildbot "test" step. +cd PCbuild +call rt.bat -q -uall -rw From buildbot at python.org Sun Jun 10 18:44:24 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 16:44:24 +0000 Subject: [Python-checkins] buildbot warnings in sparc solaris10 gcc trunk Message-ID: <20070610164424.5D9161E4009@bag.python.org> The Buildbot has detected a new failure of sparc solaris10 gcc trunk. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%2520solaris10%2520gcc%2520trunk/builds/2086 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver sincerely, -The Buildbot From python-checkins at python.org Sun Jun 10 19:55:57 2007 From: python-checkins at python.org (thomas.heller) Date: Sun, 10 Jun 2007 19:55:57 +0200 (CEST) Subject: [Python-checkins] r55855 - python/trunk/PCbuild/pcbuild.sln Message-ID: <20070610175557.131CC1E4008@bag.python.org> Author: thomas.heller Date: Sun Jun 10 19:55:51 2007 New Revision: 55855 Modified: python/trunk/PCbuild/pcbuild.sln Log: For now, disable the _bsddb, _sqlite3, _ssl, _testcapi, _tkinter modules in the ReleaseAMD64 configuration because they do not compile. Modified: python/trunk/PCbuild/pcbuild.sln ============================================================================== --- python/trunk/PCbuild/pcbuild.sln (original) +++ python/trunk/PCbuild/pcbuild.sln Sun Jun 10 19:55:51 2007 @@ -117,7 +117,6 @@ {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.ActiveCfg = Release|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.Build.0 = Release|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.ActiveCfg = Debug|Win32 @@ -133,7 +132,6 @@ {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.ActiveCfg = Release|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.Build.0 = Release|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.ActiveCfg = Debug|Win32 @@ -141,7 +139,6 @@ {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.ActiveCfg = Release|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.Build.0 = Release|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.ActiveCfg = Debug|Win32 @@ -149,7 +146,6 @@ {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.ActiveCfg = Release|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.Build.0 = Release|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.ActiveCfg = Debug|Win32 @@ -157,7 +153,6 @@ {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.ActiveCfg = Release|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.Build.0 = Release|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.ActiveCfg = Debug|Win32 @@ -273,7 +268,6 @@ {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.ActiveCfg = Release|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.Build.0 = Release|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 - {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 EndGlobalSection From buildbot at python.org Sun Jun 10 20:24:43 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 18:24:43 +0000 Subject: [Python-checkins] buildbot warnings in amd64 XP trunk Message-ID: <20070610182444.16DF51E4008@bag.python.org> The Buildbot has detected a new failure of amd64 XP trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520XP%2520trunk/builds/2 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test clean Excerpt from the test logfile: 5 tests failed: test_ctypes test_exceptions test_str test_unicode test_winsound ====================================================================== ERROR: testSettingException (test.test_exceptions.ExceptionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_exceptions.py", line 184, in testSettingException test_capi1() File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_exceptions.py", line 158, in test_capi1 import _testcapi ImportError: No module named _testcapi ====================================================================== ERROR: test_expandtabs_overflows_gracefully (test.test_str.StrTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_str.py", line 93, in test_expandtabs_overflows_gracefully self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint) File "C:\buildbot\trunk.heller-windows-amd64\build\lib\unittest.py", line 329, in failUnlessRaises callableObj(*args, **kwargs) MemoryError ====================================================================== ERROR: test_expandtabs_overflows_gracefully (test.test_unicode.UnicodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_unicode.py", line 826, in test_expandtabs_overflows_gracefully self.assertRaises(OverflowError, u't\tt\t'.expandtabs, sys.maxint) File "C:\buildbot\trunk.heller-windows-amd64\build\lib\unittest.py", line 329, in failUnlessRaises callableObj(*args, **kwargs) MemoryError ====================================================================== FAIL: test_alias_nofallback (test.test_winsound.PlaySoundTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_winsound.py", line 151, in test_alias_nofallback '!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT AssertionError: RuntimeError not raised ====================================================================== FAIL: test_stopasync (test.test_winsound.PlaySoundTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_winsound.py", line 175, in test_stopasync None, winsound.SND_PURGE AssertionError: RuntimeError not raised sincerely, -The Buildbot From python-checkins at python.org Sun Jun 10 20:27:58 2007 From: python-checkins at python.org (thomas.heller) Date: Sun, 10 Jun 2007 20:27:58 +0200 (CEST) Subject: [Python-checkins] r55856 - python/trunk/Tools/buildbot/clean-amd64.bat Message-ID: <20070610182758.0E90C1E4009@bag.python.org> Author: thomas.heller Date: Sun Jun 10 20:27:54 2007 New Revision: 55856 Modified: python/trunk/Tools/buildbot/clean-amd64.bat Log: Need to set the environment variables, otherwise devenv.com is not found. Modified: python/trunk/Tools/buildbot/clean-amd64.bat ============================================================================== --- python/trunk/Tools/buildbot/clean-amd64.bat (original) +++ python/trunk/Tools/buildbot/clean-amd64.bat Sun Jun 10 20:27:54 2007 @@ -1,5 +1,5 @@ @rem Used by the buildbot "clean" step. -REM call "%VS71COMNTOOLS%vsvars32.bat" +call "%VS71COMNTOOLS%vsvars32.bat" cd PCbuild @echo Deleting .pyc/.pyo files ... python.exe rmpyc.py From python-checkins at python.org Sun Jun 10 20:31:05 2007 From: python-checkins at python.org (georg.brandl) Date: Sun, 10 Jun 2007 20:31:05 +0200 (CEST) Subject: [Python-checkins] r55857 - sandbox/trunk/2to3/fixes/fix_numliterals.py Message-ID: <20070610183105.A02491E4008@bag.python.org> Author: georg.brandl Date: Sun Jun 10 20:31:01 2007 New Revision: 55857 Modified: sandbox/trunk/2to3/fixes/fix_numliterals.py Log: Remove the parts of the numliterals fixer that aren't PEP compliant. Modified: sandbox/trunk/2to3/fixes/fix_numliterals.py ============================================================================== --- sandbox/trunk/2to3/fixes/fix_numliterals.py (original) +++ sandbox/trunk/2to3/fixes/fix_numliterals.py Sun Jun 10 20:31:01 2007 @@ -1,5 +1,4 @@ -"""Fixer that turns 1L into 1, 0755 into 0o755, -0XABC into 0xABC, 1E5 into 1e5, 1J into 1j. +"""Fixer that turns 1L into 1, 0755 into 0o755. """ # Copyright 2007 Georg Brandl. # Licensed to PSF under a Contributor Agreement. @@ -16,21 +15,12 @@ def match(self, node): # Override return (node.type == token.NUMBER and - (node.value.startswith("0") or - 'E' in node.value or - 'J' in node.value or - node.value[-1] in "Ll")) + (node.value.startswith("0") or node.value[-1] in "Ll")) def transform(self, node): val = node.value if val[-1] in 'Ll': val = val[:-1] - if 'J' in val: - val = val.replace('J', 'j') - if 'E' in val: - val = val.replace('E', 'e') - if val.startswith('0X'): - val = '0x' + val[2:] elif val.startswith('0') and val.isdigit() and len(set(val)) > 1: val = "0o" + val[1:] From buildbot at python.org Sun Jun 10 20:58:27 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 18:58:27 +0000 Subject: [Python-checkins] buildbot warnings in PPC64 Debian trunk Message-ID: <20070610185827.A0A331E4008@bag.python.org> The Buildbot has detected a new failure of PPC64 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/PPC64%2520Debian%2520trunk/builds/16 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: make: *** [buildbottest] Segmentation fault sincerely, -The Buildbot From buildbot at python.org Sun Jun 10 21:06:08 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 19:06:08 +0000 Subject: [Python-checkins] buildbot warnings in ppc Debian unstable trunk Message-ID: <20070610190608.003061E4008@bag.python.org> The Buildbot has detected a new failure of ppc Debian unstable trunk. Full details are available at: http://www.python.org/dev/buildbot/all/ppc%2520Debian%2520unstable%2520trunk/builds/16 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_bsddb3 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From martin at v.loewis.de Sun Jun 10 21:28:49 2007 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Sun, 10 Jun 2007 21:28:49 +0200 Subject: [Python-checkins] r55855 - python/trunk/PCbuild/pcbuild.sln In-Reply-To: <20070610175557.131CC1E4008@bag.python.org> References: <20070610175557.131CC1E4008@bag.python.org> Message-ID: <466C50F1.2020608@v.loewis.de> > For now, disable the _bsddb, _sqlite3, _ssl, _testcapi, _tkinter > modules in the ReleaseAMD64 configuration because they do not compile. Please undo that change. They all ought to work fine. Leaving them off for the trunk is perhaps ok, but don't backport that to the 2.5 branch. It's this kind of problem that I anticipated for an AMD64 build slave (without knowing that this problem specifically would arise). Regards, Martin From python-checkins at python.org Sun Jun 10 21:47:45 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sun, 10 Jun 2007 21:47:45 +0200 (CEST) Subject: [Python-checkins] r55858 - peps/trunk/pep-3131.txt Message-ID: <20070610194745.D54B71E4008@bag.python.org> Author: martin.v.loewis Date: Sun Jun 10 21:47:40 2007 New Revision: 55858 Modified: peps/trunk/pep-3131.txt Log: Record that a global flag has been ruled out. Modified: peps/trunk/pep-3131.txt ============================================================================== --- peps/trunk/pep-3131.txt (original) +++ peps/trunk/pep-3131.txt Sun Jun 10 21:47:40 2007 @@ -161,7 +161,9 @@ Some people would like to see an option on selecting support for this PEP at run-time; opinions vary on what precisely that option should be, and what precisely its default value -should be. +should be. Guido van Rossum commented in [5]_ that a global +flag passed to the interpreter is not acceptable, as it would +apply to all modules. Discussion ========== @@ -252,6 +254,7 @@ .. [2] http://www.unicode.org/reports/tr39/ .. [3] http://www.unicode.org/reports/tr36/ .. [4] http://mail.python.org/pipermail/python-3000/2007-June/008161.html +.. [5] http://mail.python.org/pipermail/python-3000/2007-May/007925.html Copyright ========= From theller at ctypes.org Sun Jun 10 22:58:54 2007 From: theller at ctypes.org (Thomas Heller) Date: Sun, 10 Jun 2007 22:58:54 +0200 Subject: [Python-checkins] r55855 - python/trunk/PCbuild/pcbuild.sln In-Reply-To: <466C50F1.2020608@v.loewis.de> References: <20070610175557.131CC1E4008@bag.python.org> <466C50F1.2020608@v.loewis.de> Message-ID: Martin v. L?wis schrieb: >> For now, disable the _bsddb, _sqlite3, _ssl, _testcapi, _tkinter >> modules in the ReleaseAMD64 configuration because they do not compile. > > Please undo that change. They all ought to work fine. Leaving them off > for the trunk is perhaps ok, but don't backport that to the 2.5 branch. > > It's this kind of problem that I anticipated for an AMD64 build slave > (without knowing that this problem specifically would arise). Will do. It was thought as a temporary change anyway. Thomas From python-checkins at python.org Sun Jun 10 23:01:04 2007 From: python-checkins at python.org (skip.montanaro) Date: Sun, 10 Jun 2007 23:01:04 +0200 (CEST) Subject: [Python-checkins] r55859 - tracker/instances/python-dev/detectors/spamcheck.py Message-ID: <20070610210104.96A5F1E400D@bag.python.org> Author: skip.montanaro Date: Sun Jun 10 23:01:01 2007 New Revision: 55859 Modified: tracker/instances/python-dev/detectors/spamcheck.py Log: Correct a number of stupid mistakes (Thanks to Michael Kwiatkowski and get it to pass pylint cleanly. Still effectively untested. Modified: tracker/instances/python-dev/detectors/spamcheck.py ============================================================================== --- tracker/instances/python-dev/detectors/spamcheck.py (original) +++ tracker/instances/python-dev/detectors/spamcheck.py Sun Jun 10 23:01:01 2007 @@ -21,20 +21,24 @@ SPAM_CUTOFF = 0.85 import xmlrpclib +import socket from roundup.exceptions import Reject -def check_spam(db, cl, nodeid, newvalues): +def check_spam(_database, _klass, _nodeid, newvalues): + """Auditor to score a website submission.""" + uri = "http://%s:%s%s" % (HOST, PORT, PATH) - server = xmlrpclb.ServerProxy(uri, verbose=False) + server = xmlrpclib.ServerProxy(uri, verbose=False) try: prob = server.score(newvalues, [], {}) - except (socket.error, xmlrpclib.Fault): + except (socket.error, xmlrpclib.Error): pass else: - if prob >= CUTOFF: + if prob >= SPAM_CUTOFF: raise Reject -def init(db): - db.file.audit('create', check_spam) - db.file.audit('set', check_spam) +def init(database): + """Initialize auditor.""" + database.file.audit('create', check_spam) + database.file.audit('set', check_spam) From python-checkins at python.org Sun Jun 10 23:01:20 2007 From: python-checkins at python.org (thomas.heller) Date: Sun, 10 Jun 2007 23:01:20 +0200 (CEST) Subject: [Python-checkins] r55860 - python/trunk/PCbuild/pcbuild.sln Message-ID: <20070610210120.5A7B01E4015@bag.python.org> Author: thomas.heller Date: Sun Jun 10 23:01:17 2007 New Revision: 55860 Modified: python/trunk/PCbuild/pcbuild.sln Log: Revert commit 55855. Modified: python/trunk/PCbuild/pcbuild.sln ============================================================================== --- python/trunk/PCbuild/pcbuild.sln (original) +++ python/trunk/PCbuild/pcbuild.sln Sun Jun 10 23:01:17 2007 @@ -117,6 +117,7 @@ {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.ActiveCfg = Release|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.Release.Build.0 = Release|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {E1DBB220-D64B-423D-A545-539A55AA7FE2}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {324F66C2-44D0-4D50-B979-F9DAE7FD36DB}.Debug.ActiveCfg = Debug|Win32 @@ -132,6 +133,7 @@ {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.ActiveCfg = Release|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.Release.Build.0 = Release|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.Debug.ActiveCfg = Debug|Win32 @@ -139,6 +141,7 @@ {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.ActiveCfg = Release|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.Release.Build.0 = Release|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {59CBF474-9E06-4C50-9142-C44A118BB447}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Debug.ActiveCfg = Debug|Win32 @@ -146,6 +149,7 @@ {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.ActiveCfg = Release|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.Release.Build.0 = Release|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {5B51DFF7-5DC0-41F8-8791-A4AB7114A151}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.Debug.ActiveCfg = Debug|Win32 @@ -153,6 +157,7 @@ {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.ActiveCfg = Release|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.Release.Build.0 = Release|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {AC557788-6354-43F7-BE05-C9C8C59A344A}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug.ActiveCfg = Debug|Win32 @@ -268,6 +273,7 @@ {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.ActiveCfg = Release|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.Release.Build.0 = Release|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.ActiveCfg = ReleaseAMD64|Win32 + {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {2FF0A312-22F9-4C34-B070-842916DE27A9}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 EndGlobalSection From nnorwitz at gmail.com Sun Jun 10 23:09:12 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sun, 10 Jun 2007 17:09:12 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070610210912.GA16189@python.psfb.org> test_popen2 leaked [-26, 26, -26] references, sum=-26 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From buildbot at python.org Sun Jun 10 23:16:11 2007 From: buildbot at python.org (buildbot at python.org) Date: Sun, 10 Jun 2007 21:16:11 +0000 Subject: [Python-checkins] buildbot failure in amd64 XP trunk Message-ID: <20070610211611.2FF4E1E4008@bag.python.org> The Buildbot has detected a new failure of amd64 XP trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520XP%2520trunk/builds/4 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller BUILD FAILED: failed compile sincerely, -The Buildbot From martin at v.loewis.de Sun Jun 10 23:18:28 2007 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Sun, 10 Jun 2007 23:18:28 +0200 Subject: [Python-checkins] r55855 - python/trunk/PCbuild/pcbuild.sln In-Reply-To: References: <20070610175557.131CC1E4008@bag.python.org> <466C50F1.2020608@v.loewis.de> Message-ID: <466C6AA4.6060800@v.loewis.de> Thomas Heller schrieb: > Martin v. L?wis schrieb: >>> For now, disable the _bsddb, _sqlite3, _ssl, _testcapi, _tkinter >>> modules in the ReleaseAMD64 configuration because they do not compile. >> Please undo that change. They all ought to work fine. Leaving them off >> for the trunk is perhaps ok, but don't backport that to the 2.5 branch. >> >> It's this kind of problem that I anticipated for an AMD64 build slave >> (without knowing that this problem specifically would arise). > > > Will do. It was thought as a temporary change anyway. Ah, ok. It's fine for this to persist for a few week, if that helps (although I see you already reverted it). Regards, Martin From python-checkins at python.org Mon Jun 11 00:20:03 2007 From: python-checkins at python.org (georg.brandl) Date: Mon, 11 Jun 2007 00:20:03 +0200 (CEST) Subject: [Python-checkins] r55863 - sandbox/trunk/2to3/pgen2/tokenize.py Message-ID: <20070610222003.9CA511E400A@bag.python.org> Author: georg.brandl Date: Mon Jun 11 00:19:57 2007 New Revision: 55863 Modified: sandbox/trunk/2to3/pgen2/tokenize.py Log: Allow 0B and 0O prefixes in pgen2 tokenizer. Modified: sandbox/trunk/2to3/pgen2/tokenize.py ============================================================================== --- sandbox/trunk/2to3/pgen2/tokenize.py (original) +++ sandbox/trunk/2to3/pgen2/tokenize.py Mon Jun 11 00:19:57 2007 @@ -46,9 +46,9 @@ Ignore = Whitespace + any(r'\\\r?\n' + Whitespace) + maybe(Comment) Name = r'[a-zA-Z_]\w*' -Binnumber = r'0b[01]*' +Binnumber = r'0[bB][01]*' Hexnumber = r'0[xX][\da-fA-F]*[lL]?' -Octnumber = r'0[o]?[0-7]*[lL]?' +Octnumber = r'0[oO]?[0-7]*[lL]?' Decnumber = r'[1-9]\d*[lL]?' Intnumber = group(Binnumber, Hexnumber, Octnumber, Decnumber) Exponent = r'[eE][-+]?\d+' From python-checkins at python.org Mon Jun 11 02:42:15 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 02:42:15 +0200 (CEST) Subject: [Python-checkins] r55869 - python/trunk/Misc/ACKS Message-ID: <20070611004215.822461E4008@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 02:42:11 2007 New Revision: 55869 Modified: python/trunk/Misc/ACKS Log: Add Atul Varma for patch # 1667860 Modified: python/trunk/Misc/ACKS ============================================================================== --- python/trunk/Misc/ACKS (original) +++ python/trunk/Misc/ACKS Mon Jun 11 02:42:11 2007 @@ -661,6 +661,7 @@ Roger Upole Michael Urman Hector Urtubia +Atul Varma Dmitry Vasiliev Frank Vercruesse Jaap Vermeulen From python-checkins at python.org Mon Jun 11 03:22:07 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 03:22:07 +0200 (CEST) Subject: [Python-checkins] r55870 - python/trunk/Misc/valgrind-python.supp Message-ID: <20070611012207.B32861E4008@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 03:22:03 2007 New Revision: 55870 Modified: python/trunk/Misc/valgrind-python.supp Log: Ignore valgrind problems on Ubuntu from ld Modified: python/trunk/Misc/valgrind-python.supp ============================================================================== --- python/trunk/Misc/valgrind-python.supp (original) +++ python/trunk/Misc/valgrind-python.supp Mon Jun 11 03:22:03 2007 @@ -134,6 +134,15 @@ ### { + Generic ubuntu ld problems + Memcheck:Addr8 + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so +} + +{ Generic gentoo ld problems Memcheck:Cond obj:/lib/ld-2.3.4.so From python-checkins at python.org Mon Jun 11 03:48:51 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 03:48:51 +0200 (CEST) Subject: [Python-checkins] r55872 - python/trunk Message-ID: <20070611014851.5EE871E4008@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 03:48:46 2007 New Revision: 55872 Modified: python/trunk/ (props changed) Log: Ignore config.status.lineno which seems new (new autoconf?) From python-checkins at python.org Mon Jun 11 04:14:41 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 04:14:41 +0200 (CEST) Subject: [Python-checkins] r55873 - python/trunk/Lib/test/test_str.py python/trunk/Lib/test/test_unicode.py Message-ID: <20070611021441.DAE801E4008@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 04:14:39 2007 New Revision: 55873 Modified: python/trunk/Lib/test/test_str.py python/trunk/Lib/test/test_unicode.py Log: Prevent these tests from running on Win64 since they don\'t apply there either Modified: python/trunk/Lib/test/test_str.py ============================================================================== --- python/trunk/Lib/test/test_str.py (original) +++ python/trunk/Lib/test/test_str.py Mon Jun 11 04:14:39 2007 @@ -1,5 +1,6 @@ import unittest +import struct import sys from test import test_support, string_tests @@ -88,7 +89,7 @@ # This test only affects 32-bit platforms because expandtabs can only take # an int as the max value, not a 64-bit C long. If expandtabs is changed # to take a 64-bit long, this test should apply to all platforms. - if sys.maxint > (1 << 32): + if sys.maxint > (1 << 32) or struct.calcsize('P') != 4: return self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint) Modified: python/trunk/Lib/test/test_unicode.py ============================================================================== --- python/trunk/Lib/test/test_unicode.py (original) +++ python/trunk/Lib/test/test_unicode.py Mon Jun 11 04:14:39 2007 @@ -6,7 +6,7 @@ (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" -import unittest, sys, string, codecs, new +import unittest, sys, struct, codecs, new from test import test_support, string_tests # Error handling (bad decoder return) @@ -821,7 +821,7 @@ # This test only affects 32-bit platforms because expandtabs can only take # an int as the max value, not a 64-bit C long. If expandtabs is changed # to take a 64-bit long, this test should apply to all platforms. - if sys.maxint > (1 << 32): + if sys.maxint > (1 << 32) or struct.calcsize('P') != 4: return self.assertRaises(OverflowError, u't\tt\t'.expandtabs, sys.maxint) From python-checkins at python.org Mon Jun 11 04:16:12 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 04:16:12 +0200 (CEST) Subject: [Python-checkins] r55874 - in python/trunk: Lib/test/string_tests.py Objects/stringobject.c Objects/unicodeobject.c Message-ID: <20070611021612.E2ACA1E4008@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 04:16:10 2007 New Revision: 55874 Modified: python/trunk/Lib/test/string_tests.py python/trunk/Objects/stringobject.c python/trunk/Objects/unicodeobject.c Log: Fix a bug when there was a newline in the string expandtabs was called on. This also catches another condition that can overflow. Will backport. Modified: python/trunk/Lib/test/string_tests.py ============================================================================== --- python/trunk/Lib/test/string_tests.py (original) +++ python/trunk/Lib/test/string_tests.py Mon Jun 11 04:16:10 2007 @@ -247,8 +247,13 @@ self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs') self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs', 8) self.checkequal('abc\r\nab\r\ndef\ng\r\nhi', 'abc\r\nab\r\ndef\ng\r\nhi', 'expandtabs', 4) + self.checkequal(' a\n b', ' \ta\n\tb', 'expandtabs', 1) self.checkraises(TypeError, 'hello', 'expandtabs', 42, 42) + # This test is only valid when sizeof(int) == sizeof(void*) == 4. + if sys.maxint < (1 << 32) and struct.calcsize('P') == 4: + self.checkraises(OverflowError, + '\ta\n\tb', 'expandtabs', sys.maxint) def test_split(self): self.checkequal(['this', 'is', 'the', 'split', 'function'], Modified: python/trunk/Objects/stringobject.c ============================================================================== --- python/trunk/Objects/stringobject.c (original) +++ python/trunk/Objects/stringobject.c Mon Jun 11 04:16:10 2007 @@ -3322,7 +3322,8 @@ if (tabsize > 0) { j += tabsize - (j % tabsize); if (old_j > j) { - PyErr_SetString(PyExc_OverflowError, "new string is too long"); + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); return NULL; } old_j = j; @@ -3332,7 +3333,12 @@ j++; if (*p == '\n' || *p == '\r') { i += j; - j = 0; + old_j = j = 0; + if (i < 0) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } } } Modified: python/trunk/Objects/unicodeobject.c ============================================================================== --- python/trunk/Objects/unicodeobject.c (original) +++ python/trunk/Objects/unicodeobject.c Mon Jun 11 04:16:10 2007 @@ -5705,7 +5705,8 @@ if (tabsize > 0) { j += tabsize - (j % tabsize); if (old_j > j) { - PyErr_SetString(PyExc_OverflowError, "new string is too long"); + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); return NULL; } old_j = j; @@ -5715,7 +5716,12 @@ j++; if (*p == '\n' || *p == '\r') { i += j; - j = 0; + old_j = j = 0; + if (i < 0) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } } } From python-checkins at python.org Mon Jun 11 04:29:45 2007 From: python-checkins at python.org (skip.montanaro) Date: Mon, 11 Jun 2007 04:29:45 +0200 (CEST) Subject: [Python-checkins] r55875 - tracker/instances/python-dev/detectors/spamcheck.py Message-ID: <20070611022945.71E221E4008@bag.python.org> Author: skip.montanaro Date: Mon Jun 11 04:29:41 2007 New Revision: 55875 Modified: tracker/instances/python-dev/detectors/spamcheck.py Log: Audit issues as well as files. Do I need to audit "msg" as well? Also, in case it gets logged somewhere, note why we rejected those items we did. Modified: tracker/instances/python-dev/detectors/spamcheck.py ============================================================================== --- tracker/instances/python-dev/detectors/spamcheck.py (original) +++ tracker/instances/python-dev/detectors/spamcheck.py Mon Jun 11 04:29:41 2007 @@ -36,9 +36,11 @@ pass else: if prob >= SPAM_CUTOFF: - raise Reject + raise Reject("Looks like spam to me - prob=%.3f" % prob) def init(database): """Initialize auditor.""" + database.issue.audit('create', check_spam) + database.issue.audit('set', check_spam) database.file.audit('create', check_spam) database.file.audit('set', check_spam) From python-checkins at python.org Mon Jun 11 06:31:35 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 06:31:35 +0200 (CEST) Subject: [Python-checkins] r55877 - python/branches/release25-maint/Lib/test/test_str.py python/branches/release25-maint/Lib/test/test_unicode.py Message-ID: <20070611043135.5E8931E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 06:31:25 2007 New Revision: 55877 Modified: python/branches/release25-maint/Lib/test/test_str.py python/branches/release25-maint/Lib/test/test_unicode.py Log: Backport 55873: Prevent these tests from running on Win64 since they don't apply there either Modified: python/branches/release25-maint/Lib/test/test_str.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_str.py (original) +++ python/branches/release25-maint/Lib/test/test_str.py Mon Jun 11 06:31:25 2007 @@ -1,5 +1,6 @@ import unittest +import struct import sys from test import test_support, string_tests @@ -88,7 +89,7 @@ # This test only affects 32-bit platforms because expandtabs can only take # an int as the max value, not a 64-bit C long. If expandtabs is changed # to take a 64-bit long, this test should apply to all platforms. - if sys.maxint > (1 << 32): + if sys.maxint > (1 << 32) or struct.calcsize('P') != 4: return self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint) Modified: python/branches/release25-maint/Lib/test/test_unicode.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_unicode.py (original) +++ python/branches/release25-maint/Lib/test/test_unicode.py Mon Jun 11 06:31:25 2007 @@ -6,7 +6,7 @@ (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" -import unittest, sys, string, codecs, new +import unittest, sys, struct, codecs, new from test import test_support, string_tests # Error handling (bad decoder return) @@ -821,7 +821,7 @@ # This test only affects 32-bit platforms because expandtabs can only take # an int as the max value, not a 64-bit C long. If expandtabs is changed # to take a 64-bit long, this test should apply to all platforms. - if sys.maxint > (1 << 32): + if sys.maxint > (1 << 32) or struct.calcsize('P') != 4: return self.assertRaises(OverflowError, u't\tt\t'.expandtabs, sys.maxint) From python-checkins at python.org Mon Jun 11 06:32:49 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 06:32:49 +0200 (CEST) Subject: [Python-checkins] r55878 - in python/branches/release25-maint: Lib/test/string_tests.py Objects/stringobject.c Objects/unicodeobject.c Message-ID: <20070611043249.225081E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 06:32:41 2007 New Revision: 55878 Modified: python/branches/release25-maint/Lib/test/string_tests.py python/branches/release25-maint/Objects/stringobject.c python/branches/release25-maint/Objects/unicodeobject.c Log: Backport 55874: Fix a bug when there was a newline in the string expandtabs was called on. This also catches another condition that can overflow. Modified: python/branches/release25-maint/Lib/test/string_tests.py ============================================================================== --- python/branches/release25-maint/Lib/test/string_tests.py (original) +++ python/branches/release25-maint/Lib/test/string_tests.py Mon Jun 11 06:32:41 2007 @@ -247,8 +247,13 @@ self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs') self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs', 8) self.checkequal('abc\r\nab\r\ndef\ng\r\nhi', 'abc\r\nab\r\ndef\ng\r\nhi', 'expandtabs', 4) + self.checkequal(' a\n b', ' \ta\n\tb', 'expandtabs', 1) self.checkraises(TypeError, 'hello', 'expandtabs', 42, 42) + # This test is only valid when sizeof(int) == sizeof(void*) == 4. + if sys.maxint < (1 << 32) and struct.calcsize('P') == 4: + self.checkraises(OverflowError, + '\ta\n\tb', 'expandtabs', sys.maxint) def test_split(self): self.checkequal(['this', 'is', 'the', 'split', 'function'], Modified: python/branches/release25-maint/Objects/stringobject.c ============================================================================== --- python/branches/release25-maint/Objects/stringobject.c (original) +++ python/branches/release25-maint/Objects/stringobject.c Mon Jun 11 06:32:41 2007 @@ -3313,7 +3313,8 @@ if (tabsize > 0) { j += tabsize - (j % tabsize); if (old_j > j) { - PyErr_SetString(PyExc_OverflowError, "new string is too long"); + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); return NULL; } old_j = j; @@ -3323,7 +3324,12 @@ j++; if (*p == '\n' || *p == '\r') { i += j; - j = 0; + old_j = j = 0; + if (i < 0) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } } } Modified: python/branches/release25-maint/Objects/unicodeobject.c ============================================================================== --- python/branches/release25-maint/Objects/unicodeobject.c (original) +++ python/branches/release25-maint/Objects/unicodeobject.c Mon Jun 11 06:32:41 2007 @@ -5701,7 +5701,8 @@ if (tabsize > 0) { j += tabsize - (j % tabsize); if (old_j > j) { - PyErr_SetString(PyExc_OverflowError, "new string is too long"); + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); return NULL; } old_j = j; @@ -5711,7 +5712,12 @@ j++; if (*p == '\n' || *p == '\r') { i += j; - j = 0; + old_j = j = 0; + if (i < 0) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } } } From python-checkins at python.org Mon Jun 11 06:52:43 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 06:52:43 +0200 (CEST) Subject: [Python-checkins] r55879 - python/trunk/Lib/test/test_urllib2_localnet.py Message-ID: <20070611045243.CC2341E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 06:52:37 2007 New Revision: 55879 Modified: python/trunk/Lib/test/test_urllib2_localnet.py Log: Prevent hang if the port cannot be opened. Modified: python/trunk/Lib/test/test_urllib2_localnet.py ============================================================================== --- python/trunk/Lib/test/test_urllib2_localnet.py (original) +++ python/trunk/Lib/test/test_urllib2_localnet.py Mon Jun 11 06:52:37 2007 @@ -47,6 +47,7 @@ self._port = port self._server_address = ('127.0.0.1', self._port) self.ready = threading.Event() + self.error = None def stop(self): """Stops the webserver if it's currently running.""" @@ -59,12 +60,18 @@ def run(self): protocol = "HTTP/1.0" - self._RequestHandlerClass.protocol_version = protocol - httpd = LoopbackHttpServer(self._server_address, - self._RequestHandlerClass) - - sa = httpd.socket.getsockname() - #print "Serving HTTP on", sa[0], "port", sa[1], "..." + try: + self._RequestHandlerClass.protocol_version = protocol + httpd = LoopbackHttpServer(self._server_address, + self._RequestHandlerClass) + + sa = httpd.socket.getsockname() + #print "Serving HTTP on", sa[0], "port", sa[1], "..." + except: + # Fail "gracefully" if we are unable to start. + self.ready.set() + self.error = sys.exc_info()[1] + raise self.ready.set() while not self._stop: @@ -241,6 +248,8 @@ self.server = LoopbackHttpServerThread(self.PORT, FakeProxyHandler) self.server.start() self.server.ready.wait() + if self.server.error: + raise self.server.error handler = urllib2.ProxyHandler({"http" : self.PROXY_URL}) self._digest_auth_handler = urllib2.ProxyDigestAuthHandler() From buildbot at python.org Mon Jun 11 07:09:42 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 11 Jun 2007 05:09:42 +0000 Subject: [Python-checkins] buildbot warnings in amd64 gentoo 2.5 Message-ID: <20070611050943.0D9AD1E4002@bag.python.org> The Buildbot has detected a new failure of amd64 gentoo 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520gentoo%25202.5/builds/332 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: neal.norwitz Build had warnings: warnings failed slave lost sincerely, -The Buildbot From python-checkins at python.org Mon Jun 11 07:28:52 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 07:28:52 +0200 (CEST) Subject: [Python-checkins] r55881 - in python/trunk/Lib: distutils/mwerkscompiler.py test/test_sundry.py Message-ID: <20070611052852.7023E1E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 07:28:45 2007 New Revision: 55881 Modified: python/trunk/Lib/distutils/mwerkscompiler.py python/trunk/Lib/test/test_sundry.py Log: Add all of the distuils modules that don't seem to have explicit tests. :-( Move an import in mworkscompiler so that this module can be imported on any platform. Hopefully this works on all platforms. Modified: python/trunk/Lib/distutils/mwerkscompiler.py ============================================================================== --- python/trunk/Lib/distutils/mwerkscompiler.py (original) +++ python/trunk/Lib/distutils/mwerkscompiler.py Mon Jun 11 07:28:45 2007 @@ -18,7 +18,6 @@ import distutils.util import distutils.dir_util from distutils import log -import mkcwproject class MWerksCompiler (CCompiler) : """Concrete class that implements an interface to MetroWerks CodeWarrior, @@ -188,6 +187,7 @@ # doesn't have a clue about our working directory. xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) log.debug("\tCreate XML file %s", xmlfilename) + import mkcwproject xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder.generate() xmldata = settings['tmp_projectxmldata'] Modified: python/trunk/Lib/test/test_sundry.py ============================================================================== --- python/trunk/Lib/test/test_sundry.py (original) +++ python/trunk/Lib/test/test_sundry.py Mon Jun 11 07:28:45 2007 @@ -1,6 +1,7 @@ """Do a minimal test of all the modules that aren't otherwise tested.""" from test.test_support import guard_warnings_filter +import sys import warnings with guard_warnings_filter(): @@ -22,6 +23,52 @@ import cmd import code import compileall + + import distutils.archive_util + import distutils.bcppcompiler + import distutils.ccompiler + import distutils.cmd + import distutils.core + import distutils.cygwinccompiler + import distutils.dep_util + import distutils.dir_util + import distutils.emxccompiler + import distutils.errors + import distutils.extension + import distutils.file_util + import distutils.filelist + import distutils.log + import distutils.msvccompiler + import distutils.mwerkscompiler + import distutils.sysconfig + import distutils.text_file + import distutils.unixccompiler + import distutils.util + import distutils.version + + import distutils.command.bdist_dumb + if sys.platform.startswith('win'): + import distutils.command.bdist_msi + import distutils.command.bdist + import distutils.command.bdist_rpm + import distutils.command.bdist_wininst + import distutils.command.build_clib + import distutils.command.build_ext + import distutils.command.build + import distutils.command.build_py + import distutils.command.build_scripts + import distutils.command.clean + import distutils.command.config + import distutils.command.install_data + import distutils.command.install_egg_info + import distutils.command.install_headers + import distutils.command.install_lib + import distutils.command.install + import distutils.command.install_scripts + import distutils.command.register + import distutils.command.sdist + import distutils.command.upload + import encodings import formatter import ftplib @@ -42,7 +89,6 @@ import os2emxpath import pdb import pipes - #import poplib import posixfile import pstats import py_compile From python-checkins at python.org Mon Jun 11 07:35:14 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 07:35:14 +0200 (CEST) Subject: [Python-checkins] r55882 - python/trunk/Doc/tut/tut.tex Message-ID: <20070611053514.3EB171E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 07:35:10 2007 New Revision: 55882 Modified: python/trunk/Doc/tut/tut.tex Log: SF #1734732, lower case the module names per PEP 8. Will backport. Modified: python/trunk/Doc/tut/tut.tex ============================================================================== --- python/trunk/Doc/tut/tut.tex (original) +++ python/trunk/Doc/tut/tut.tex Mon Jun 11 07:35:10 2007 @@ -2758,9 +2758,9 @@ hierarchical filesystem): \begin{verbatim} -Sound/ Top-level package +sound/ Top-level package __init__.py Initialize the sound package - Formats/ Subpackage for file format conversions + formats/ Subpackage for file format conversions __init__.py wavread.py wavwrite.py @@ -2769,13 +2769,13 @@ auread.py auwrite.py ... - Effects/ Subpackage for sound effects + effects/ Subpackage for sound effects __init__.py echo.py surround.py reverse.py ... - Filters/ Subpackage for filters + filters/ Subpackage for filters __init__.py equalizer.py vocoder.py @@ -2798,20 +2798,20 @@ package, for example: \begin{verbatim} -import Sound.Effects.echo +import sound.effects.echo \end{verbatim} -This loads the submodule \module{Sound.Effects.echo}. It must be referenced +This loads the submodule \module{sound.effects.echo}. It must be referenced with its full name. \begin{verbatim} -Sound.Effects.echo.echofilter(input, output, delay=0.7, atten=4) +sound.effects.echo.echofilter(input, output, delay=0.7, atten=4) \end{verbatim} An alternative way of importing the submodule is: \begin{verbatim} -from Sound.Effects import echo +from sound.effects import echo \end{verbatim} This also loads the submodule \module{echo}, and makes it available without @@ -2824,7 +2824,7 @@ Yet another variation is to import the desired function or variable directly: \begin{verbatim} -from Sound.Effects.echo import echofilter +from sound.effects.echo import echofilter \end{verbatim} Again, this loads the submodule \module{echo}, but this makes its function @@ -2851,7 +2851,7 @@ %The \code{__all__} Attribute \ttindex{__all__} -Now what happens when the user writes \code{from Sound.Effects import +Now what happens when the user writes \code{from sound.effects import *}? Ideally, one would hope that this somehow goes out to the filesystem, finds which submodules are present in the package, and imports them all. Unfortunately, this operation does not work very @@ -2873,19 +2873,19 @@ up-to-date when a new version of the package is released. Package authors may also decide not to support it, if they don't see a use for importing * from their package. For example, the file -\file{Sounds/Effects/__init__.py} could contain the following code: +\file{sounds/effects/__init__.py} could contain the following code: \begin{verbatim} __all__ = ["echo", "surround", "reverse"] \end{verbatim} -This would mean that \code{from Sound.Effects import *} would -import the three named submodules of the \module{Sound} package. +This would mean that \code{from sound.effects import *} would +import the three named submodules of the \module{sound} package. -If \code{__all__} is not defined, the statement \code{from Sound.Effects +If \code{__all__} is not defined, the statement \code{from sound.effects import *} does \emph{not} import all submodules from the package -\module{Sound.Effects} into the current namespace; it only ensures that the -package \module{Sound.Effects} has been imported (possibly running any +\module{sound.effects} into the current namespace; it only ensures that the +package \module{sound.effects} has been imported (possibly running any initialization code in \file{__init__.py}) and then imports whatever names are defined in the package. This includes any names defined (and submodules explicitly loaded) by \file{__init__.py}. It also includes any @@ -2893,14 +2893,14 @@ import statements. Consider this code: \begin{verbatim} -import Sound.Effects.echo -import Sound.Effects.surround -from Sound.Effects import * +import sound.effects.echo +import sound.effects.surround +from sound.effects import * \end{verbatim} In this example, the echo and surround modules are imported in the current namespace because they are defined in the -\module{Sound.Effects} package when the \code{from...import} statement +\module{sound.effects} package when the \code{from...import} statement is executed. (This also works when \code{__all__} is defined.) Note that in general the practice of importing \code{*} from a module or @@ -2928,12 +2928,12 @@ statement looks for a top-level module with the given name. When packages are structured into subpackages (as with the -\module{Sound} package in the example), there's no shortcut to refer +\module{sound} package in the example), there's no shortcut to refer to submodules of sibling packages - the full name of the subpackage must be used. For example, if the module -\module{Sound.Filters.vocoder} needs to use the \module{echo} module -in the \module{Sound.Effects} package, it can use \code{from -Sound.Effects import echo}. +\module{sound.filters.vocoder} needs to use the \module{echo} module +in the \module{sound.effects} package, it can use \code{from +sound.effects import echo}. Starting with Python 2.5, in addition to the implicit relative imports described above, you can write explicit relative imports with the @@ -2944,8 +2944,8 @@ \begin{verbatim} from . import echo -from .. import Formats -from ..Filters import equalizer +from .. import formats +from ..filters import equalizer \end{verbatim} Note that both explicit and implicit relative imports are based on the From python-checkins at python.org Mon Jun 11 07:36:50 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 07:36:50 +0200 (CEST) Subject: [Python-checkins] r55883 - python/branches/release25-maint/Doc/tut/tut.tex Message-ID: <20070611053650.ABF581E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 07:36:48 2007 New Revision: 55883 Modified: python/branches/release25-maint/Doc/tut/tut.tex Log: Backport 55882: SF #1734732, lower case the module names per PEP 8. Modified: python/branches/release25-maint/Doc/tut/tut.tex ============================================================================== --- python/branches/release25-maint/Doc/tut/tut.tex (original) +++ python/branches/release25-maint/Doc/tut/tut.tex Mon Jun 11 07:36:48 2007 @@ -2758,9 +2758,9 @@ hierarchical filesystem): \begin{verbatim} -Sound/ Top-level package +sound/ Top-level package __init__.py Initialize the sound package - Formats/ Subpackage for file format conversions + formats/ Subpackage for file format conversions __init__.py wavread.py wavwrite.py @@ -2769,13 +2769,13 @@ auread.py auwrite.py ... - Effects/ Subpackage for sound effects + effects/ Subpackage for sound effects __init__.py echo.py surround.py reverse.py ... - Filters/ Subpackage for filters + filters/ Subpackage for filters __init__.py equalizer.py vocoder.py @@ -2798,20 +2798,20 @@ package, for example: \begin{verbatim} -import Sound.Effects.echo +import sound.effects.echo \end{verbatim} -This loads the submodule \module{Sound.Effects.echo}. It must be referenced +This loads the submodule \module{sound.effects.echo}. It must be referenced with its full name. \begin{verbatim} -Sound.Effects.echo.echofilter(input, output, delay=0.7, atten=4) +sound.effects.echo.echofilter(input, output, delay=0.7, atten=4) \end{verbatim} An alternative way of importing the submodule is: \begin{verbatim} -from Sound.Effects import echo +from sound.effects import echo \end{verbatim} This also loads the submodule \module{echo}, and makes it available without @@ -2824,7 +2824,7 @@ Yet another variation is to import the desired function or variable directly: \begin{verbatim} -from Sound.Effects.echo import echofilter +from sound.effects.echo import echofilter \end{verbatim} Again, this loads the submodule \module{echo}, but this makes its function @@ -2851,7 +2851,7 @@ %The \code{__all__} Attribute \ttindex{__all__} -Now what happens when the user writes \code{from Sound.Effects import +Now what happens when the user writes \code{from sound.effects import *}? Ideally, one would hope that this somehow goes out to the filesystem, finds which submodules are present in the package, and imports them all. Unfortunately, this operation does not work very @@ -2873,19 +2873,19 @@ up-to-date when a new version of the package is released. Package authors may also decide not to support it, if they don't see a use for importing * from their package. For example, the file -\file{Sounds/Effects/__init__.py} could contain the following code: +\file{sounds/effects/__init__.py} could contain the following code: \begin{verbatim} __all__ = ["echo", "surround", "reverse"] \end{verbatim} -This would mean that \code{from Sound.Effects import *} would -import the three named submodules of the \module{Sound} package. +This would mean that \code{from sound.effects import *} would +import the three named submodules of the \module{sound} package. -If \code{__all__} is not defined, the statement \code{from Sound.Effects +If \code{__all__} is not defined, the statement \code{from sound.effects import *} does \emph{not} import all submodules from the package -\module{Sound.Effects} into the current namespace; it only ensures that the -package \module{Sound.Effects} has been imported (possibly running any +\module{sound.effects} into the current namespace; it only ensures that the +package \module{sound.effects} has been imported (possibly running any initialization code in \file{__init__.py}) and then imports whatever names are defined in the package. This includes any names defined (and submodules explicitly loaded) by \file{__init__.py}. It also includes any @@ -2893,14 +2893,14 @@ import statements. Consider this code: \begin{verbatim} -import Sound.Effects.echo -import Sound.Effects.surround -from Sound.Effects import * +import sound.effects.echo +import sound.effects.surround +from sound.effects import * \end{verbatim} In this example, the echo and surround modules are imported in the current namespace because they are defined in the -\module{Sound.Effects} package when the \code{from...import} statement +\module{sound.effects} package when the \code{from...import} statement is executed. (This also works when \code{__all__} is defined.) Note that in general the practice of importing \code{*} from a module or @@ -2928,12 +2928,12 @@ statement looks for a top-level module with the given name. When packages are structured into subpackages (as with the -\module{Sound} package in the example), there's no shortcut to refer +\module{sound} package in the example), there's no shortcut to refer to submodules of sibling packages - the full name of the subpackage must be used. For example, if the module -\module{Sound.Filters.vocoder} needs to use the \module{echo} module -in the \module{Sound.Effects} package, it can use \code{from -Sound.Effects import echo}. +\module{sound.filters.vocoder} needs to use the \module{echo} module +in the \module{sound.effects} package, it can use \code{from +sound.effects import echo}. Starting with Python 2.5, in addition to the implicit relative imports described above, you can write explicit relative imports with the @@ -2944,8 +2944,8 @@ \begin{verbatim} from . import echo -from .. import Formats -from ..Filters import equalizer +from .. import formats +from ..filters import equalizer \end{verbatim} Note that both explicit and implicit relative imports are based on the From buildbot at python.org Mon Jun 11 07:56:03 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 11 Jun 2007 05:56:03 +0000 Subject: [Python-checkins] buildbot warnings in amd64 gentoo trunk Message-ID: <20070611055603.553071E4004@bag.python.org> The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520gentoo%2520trunk/builds/2108 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '2000-2000-2000-2000-2000' Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '0002-0002-0002-0002-0002' Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 260, in writerThread self.assertEqual(data, self.makeData(key)) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/unittest.py", line 343, in failUnlessEqual (msg or '%r != %r' % (first, second)) AssertionError: None != '1001-1001-1001-1001-1001' 1 test failed: test_sundry make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Mon Jun 11 08:02:43 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 11 Jun 2007 06:02:43 +0000 Subject: [Python-checkins] buildbot warnings in alpha Debian trunk Message-ID: <20070611060243.C967A1E4002@bag.python.org> The Buildbot has detected a new failure of alpha Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/alpha%2520Debian%2520trunk/builds/14 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: neal.norwitz Build had warnings: warnings failed slave lost sincerely, -The Buildbot From python-checkins at python.org Mon Jun 11 08:16:51 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 08:16:51 +0200 (CEST) Subject: [Python-checkins] r55885 - python/trunk/Lib/test/test_sundry.py Message-ID: <20070611061651.7EAF11E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 08:16:48 2007 New Revision: 55885 Modified: python/trunk/Lib/test/test_sundry.py Log: Not sure why this only fails sometimes on Unix machines. Better to disable it and only import msvccompiler on Windows since that's the only place it can work anyways. Modified: python/trunk/Lib/test/test_sundry.py ============================================================================== --- python/trunk/Lib/test/test_sundry.py (original) +++ python/trunk/Lib/test/test_sundry.py Mon Jun 11 08:16:48 2007 @@ -38,7 +38,8 @@ import distutils.file_util import distutils.filelist import distutils.log - import distutils.msvccompiler + if sys.platform.startswith('win'): + import distutils.msvccompiler import distutils.mwerkscompiler import distutils.sysconfig import distutils.text_file From python-checkins at python.org Mon Jun 11 09:29:44 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 09:29:44 +0200 (CEST) Subject: [Python-checkins] r55887 - in python/trunk: Lib/repr.py Lib/test/test_repr.py Misc/NEWS Message-ID: <20070611072944.1DD081E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 09:29:43 2007 New Revision: 55887 Modified: python/trunk/Lib/repr.py python/trunk/Lib/test/test_repr.py python/trunk/Misc/NEWS Log: Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. Will backport Modified: python/trunk/Lib/repr.py ============================================================================== --- python/trunk/Lib/repr.py (original) +++ python/trunk/Lib/repr.py Mon Jun 11 09:29:43 2007 @@ -52,7 +52,7 @@ return '%s%s%s' % (left, s, right) def repr_tuple(self, x, level): - return self._repr_iterable(x, level, '(', ')', self.maxlist, ',') + return self._repr_iterable(x, level, '(', ')', self.maxtuple, ',') def repr_list(self, x, level): return self._repr_iterable(x, level, '[', ']', self.maxlist) Modified: python/trunk/Lib/test/test_repr.py ============================================================================== --- python/trunk/Lib/test/test_repr.py (original) +++ python/trunk/Lib/test/test_repr.py Mon Jun 11 09:29:43 2007 @@ -10,6 +10,7 @@ from test.test_support import run_unittest from repr import repr as r # Don't shadow builtin repr +from repr import Repr def nestedTuple(nesting): @@ -34,6 +35,18 @@ expected = repr(s)[:13] + "..." + repr(s)[-14:] eq(r(s), expected) + def test_tuple(self): + eq = self.assertEquals + eq(r((1,)), "(1,)") + + t3 = (1, 2, 3) + eq(r(t3), "(1, 2, 3)") + + r2 = Repr() + r2.maxtuple = 2 + expected = repr(t3)[:-2] + "...)" + eq(r2.repr(t3), expected) + def test_container(self): from array import array from collections import deque Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jun 11 09:29:43 2007 @@ -229,6 +229,8 @@ Library ------- +- Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. + - The urlopen function of urllib2 now has an optional timeout parameter (note that it actually works with HTTP, HTTPS, FTP and FTPS connections). From python-checkins at python.org Mon Jun 11 09:34:13 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 09:34:13 +0200 (CEST) Subject: [Python-checkins] r55888 - in python/branches/release25-maint: Lib/repr.py Lib/test/test_repr.py Misc/NEWS Message-ID: <20070611073413.0AC891E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 09:34:07 2007 New Revision: 55888 Modified: python/branches/release25-maint/Lib/repr.py python/branches/release25-maint/Lib/test/test_repr.py python/branches/release25-maint/Misc/NEWS Log: Backport 55887: Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. Modified: python/branches/release25-maint/Lib/repr.py ============================================================================== --- python/branches/release25-maint/Lib/repr.py (original) +++ python/branches/release25-maint/Lib/repr.py Mon Jun 11 09:34:07 2007 @@ -52,7 +52,7 @@ return '%s%s%s' % (left, s, right) def repr_tuple(self, x, level): - return self._repr_iterable(x, level, '(', ')', self.maxlist, ',') + return self._repr_iterable(x, level, '(', ')', self.maxtuple, ',') def repr_list(self, x, level): return self._repr_iterable(x, level, '[', ']', self.maxlist) Modified: python/branches/release25-maint/Lib/test/test_repr.py ============================================================================== --- python/branches/release25-maint/Lib/test/test_repr.py (original) +++ python/branches/release25-maint/Lib/test/test_repr.py Mon Jun 11 09:34:07 2007 @@ -10,6 +10,7 @@ from test.test_support import run_unittest from repr import repr as r # Don't shadow builtin repr +from repr import Repr def nestedTuple(nesting): @@ -34,6 +35,18 @@ expected = repr(s)[:13] + "..." + repr(s)[-14:] eq(r(s), expected) + def test_tuple(self): + eq = self.assertEquals + eq(r((1,)), "(1,)") + + t3 = (1, 2, 3) + eq(r(t3), "(1, 2, 3)") + + r2 = Repr() + r2.maxtuple = 2 + expected = repr(t3)[:-2] + "...)" + eq(r2.repr(t3), expected) + def test_container(self): from array import array from collections import deque Modified: python/branches/release25-maint/Misc/NEWS ============================================================================== --- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Mon Jun 11 09:34:07 2007 @@ -14,8 +14,8 @@ - Patch #1733960: Allow T_LONGLONG to accept ints. -- Prevent expandtabs() on string and unicode objects from causing a segfault when - a large width is passed on 32-bit platforms. +- Prevent expandtabs() on string and unicode objects from causing a segfault + when a large width is passed on 32-bit platforms. - Bug #1733488: Fix compilation of bufferobject.c on AIX. @@ -23,6 +23,8 @@ Library ------- +- Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. + - Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. From python-checkins at python.org Mon Jun 11 09:36:31 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 11 Jun 2007 09:36:31 +0200 (CEST) Subject: [Python-checkins] r55889 - python/trunk/Misc/NEWS Message-ID: <20070611073631.9B2701E4002@bag.python.org> Author: neal.norwitz Date: Mon Jun 11 09:36:24 2007 New Revision: 55889 Modified: python/trunk/Misc/NEWS Log: Reflow long line Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jun 11 09:36:24 2007 @@ -14,8 +14,8 @@ - Patch #1733960: Allow T_LONGLONG to accept ints. -- Prevent expandtabs() on string and unicode objects from causing a segfault when - a large width is passed on 32-bit platforms. +- Prevent expandtabs() on string and unicode objects from causing a segfault + when a large width is passed on 32-bit platforms. - Bug #1733488: Fix compilation of bufferobject.c on AIX. From buildbot at python.org Mon Jun 11 10:09:02 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 11 Jun 2007 08:09:02 +0000 Subject: [Python-checkins] buildbot warnings in PPC64 Debian trunk Message-ID: <20070611080902.489421E4002@bag.python.org> The Buildbot has detected a new failure of PPC64 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/PPC64%2520Debian%2520trunk/builds/22 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home/pybot/buildarea64/trunk.klose-debian-ppc64/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Mon Jun 11 10:50:07 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 11 Jun 2007 08:50:07 +0000 Subject: [Python-checkins] buildbot warnings in ia64 Ubuntu trunk trunk Message-ID: <20070611085007.59EF11E4004@bag.python.org> The Buildbot has detected a new failure of ia64 Ubuntu trunk trunk. Full details are available at: http://www.python.org/dev/buildbot/all/ia64%2520Ubuntu%2520trunk%2520trunk/builds/719 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: 2 tests failed: test_socket_ssl test_urllib2net make: *** [buildbottest] Error 1 sincerely, -The Buildbot From nnorwitz at gmail.com Mon Jun 11 11:14:29 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 11 Jun 2007 05:14:29 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070611091429.GA23603@python.psfb.org> test_urllib2_localnet leaked [3, 3, -7] references, sum=-1 From buildbot at python.org Mon Jun 11 12:37:54 2007 From: buildbot at python.org (buildbot at python.org) Date: Mon, 11 Jun 2007 10:37:54 +0000 Subject: [Python-checkins] buildbot warnings in alpha Debian trunk Message-ID: <20070611103755.038BC1E4002@bag.python.org> The Buildbot has detected a new failure of alpha Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/alpha%2520Debian%2520trunk/builds/16 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: neal.norwitz Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Mon Jun 11 15:06:19 2007 From: python-checkins at python.org (facundo.batista) Date: Mon, 11 Jun 2007 15:06:19 +0200 (CEST) Subject: [Python-checkins] r55890 - python/branches/decimal-branch/Lib/decimal.py Message-ID: <20070611130619.B10AC1E4002@bag.python.org> Author: facundo.batista Date: Mon Jun 11 15:06:14 2007 New Revision: 55890 Modified: python/branches/decimal-branch/Lib/decimal.py Log: Coded the functions scaleb, shift and rotate. All tests pass ok. Modified: python/branches/decimal-branch/Lib/decimal.py ============================================================================== --- python/branches/decimal-branch/Lib/decimal.py (original) +++ python/branches/decimal-branch/Lib/decimal.py Mon Jun 11 15:06:14 2007 @@ -2570,12 +2570,106 @@ def rotate(self, other, context=None): """Returns a rotated copy of self, value-of-other times.""" + if context is None: + context = getcontext() + + ans = self._check_nans(other, context) + if ans: + return ans + + if other._exp != 0: + return context._raise_error(InvalidOperation) + if not (-context.prec <= int(other) <= context.prec): + return context._raise_error(InvalidOperation) + + if self._isinfinity(): + return self + + # get values, pad if necessary + torot = int(other) + rotdig = self._int + topad = context.prec - len(rotdig) + if topad: + rotdig = ((0,)*topad) + rotdig + + # let's rotate! + rotated = rotdig[torot:] + rotdig[:torot] + + # clean starting zeroes + for i,d in enumerate(rotated): + if d != 0: + break + rotated = rotated[i:] + + return Decimal((self._sign, rotated, self._exp)) + def scaleb (self, other, context=None): """Returns self operand after adding the second value to its exp.""" + if context is None: + context = getcontext() + + ans = self._check_nans(other, context) + if ans: + return ans + + if other._exp != 0: + return context._raise_error(InvalidOperation) + liminf = -2 * (context.Emax + context.prec) + limsup = 2 * (context.Emax + context.prec) + if not (liminf <= int(other) <= limsup): + return context._raise_error(InvalidOperation) + + if self._isinfinity(): + return self + + d = Decimal((self._sign, self._int, self._exp + int(other))) + d = d._fixexponents(context) + return d def shift(self, other, context=None): """Returns a shifted copy of self, value-of-other times.""" + if context is None: + context = getcontext() + + ans = self._check_nans(other, context) + if ans: + return ans + + if other._exp != 0: + return context._raise_error(InvalidOperation) + if not (-context.prec <= int(other) <= context.prec): + return context._raise_error(InvalidOperation) + + if self._isinfinity(): + return self + + # get values, pad if necessary + torot = int(other) + if not torot: + return self + rotdig = self._int + topad = context.prec - len(rotdig) + if topad: + rotdig = ((0,)*topad) + rotdig + + # let's shift! + if torot < 0: + rotated = rotdig[:torot] + else: + rotated = (rotdig + ((0,) * torot)) + rotated = rotated[-context.prec:] + + # clean starting zeroes + if rotated: + for i,d in enumerate(rotated): + if d != 0: + break + rotated = rotated[i:] + else: + rotated = (0,) + + return Decimal((self._sign, rotated, self._exp)) # Support for pickling, copy, and deepcopy From python-checkins at python.org Mon Jun 11 17:58:38 2007 From: python-checkins at python.org (thomas.heller) Date: Mon, 11 Jun 2007 17:58:38 +0200 (CEST) Subject: [Python-checkins] r55896 - python/trunk/Modules/_ctypes/callproc.c python/trunk/Modules/_ctypes/ctypes.h Message-ID: <20070611155838.4CBC71E4002@bag.python.org> Author: thomas.heller Date: Mon Jun 11 17:58:33 2007 New Revision: 55896 Modified: python/trunk/Modules/_ctypes/callproc.c python/trunk/Modules/_ctypes/ctypes.h Log: Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k" or "K" codes. Modified: python/trunk/Modules/_ctypes/callproc.c ============================================================================== --- python/trunk/Modules/_ctypes/callproc.c (original) +++ python/trunk/Modules/_ctypes/callproc.c Mon Jun 11 17:58:33 2007 @@ -1046,6 +1046,15 @@ return retval; } +static int +_parse_voidp(PyObject *obj, void **address) +{ + *address = PyLong_AsVoidPtr(obj); + if (*address == NULL) + return 0; + return 1; +} + #ifdef MS_WIN32 #ifdef _UNICODE @@ -1133,7 +1142,7 @@ static PyObject *free_library(PyObject *self, PyObject *args) { void *hMod; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":FreeLibrary", &hMod)) + if (!PyArg_ParseTuple(args, "O&:FreeLibrary", &_parse_voidp, &hMod)) return NULL; if (!FreeLibrary((HMODULE)hMod)) return PyErr_SetFromWindowsErr(GetLastError()); @@ -1256,7 +1265,7 @@ { void *handle; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":dlclose", &handle)) + if (!PyArg_ParseTuple(args, "O&:dlclose", &_parse_voidp, &handle)) return NULL; if (dlclose(handle)) { PyErr_SetString(PyExc_OSError, @@ -1273,7 +1282,8 @@ void *handle; void *ptr; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE "s:dlsym", &handle, &name)) + if (!PyArg_ParseTuple(args, "O&s:dlsym", + &_parse_voidp, &handle, &name)) return NULL; ptr = ctypes_dlsym((void*)handle, name); if (!ptr) { @@ -1298,8 +1308,8 @@ PyObject *result; if (!PyArg_ParseTuple(args, - PY_VOID_P_CODE "O!", - &func, + "O&O!", + &_parse_voidp, &func, &PyTuple_Type, &arguments)) return NULL; @@ -1329,8 +1339,8 @@ PyObject *result; if (!PyArg_ParseTuple(args, - PY_VOID_P_CODE "O!", - &func, + "O&O!", + &_parse_voidp, &func, &PyTuple_Type, &arguments)) return NULL; Modified: python/trunk/Modules/_ctypes/ctypes.h ============================================================================== --- python/trunk/Modules/_ctypes/ctypes.h (original) +++ python/trunk/Modules/_ctypes/ctypes.h Mon Jun 11 17:58:33 2007 @@ -24,12 +24,6 @@ #define PY_LONG_LONG LONG_LONG #endif -#if SIZEOF_VOID_P == SIZEOF_LONG -#define PY_VOID_P_CODE "k" -#elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P == SIZEOF_LONG_LONG) -#define PY_VOID_P_CODE "K" -#endif - typedef struct tagPyCArgObject PyCArgObject; typedef struct tagCDataObject CDataObject; typedef PyObject *(* GETFUNC)(void *, Py_ssize_t size); From python-checkins at python.org Mon Jun 11 18:27:16 2007 From: python-checkins at python.org (facundo.batista) Date: Mon, 11 Jun 2007 18:27:16 +0200 (CEST) Subject: [Python-checkins] r55901 - python/trunk/Doc/lib/libftplib.tex python/trunk/Doc/lib/libhttplib.tex python/trunk/Doc/lib/libpoplib.tex python/trunk/Doc/lib/libsmtplib.tex python/trunk/Doc/lib/libsocket.tex python/trunk/Doc/lib/libtelnetlib.tex python/trunk/Doc/lib/liburllib2.tex Message-ID: <20070611162716.3EBB21E400D@bag.python.org> Author: facundo.batista Date: Mon Jun 11 18:27:08 2007 New Revision: 55901 Modified: python/trunk/Doc/lib/libftplib.tex python/trunk/Doc/lib/libhttplib.tex python/trunk/Doc/lib/libpoplib.tex python/trunk/Doc/lib/libsmtplib.tex python/trunk/Doc/lib/libsocket.tex python/trunk/Doc/lib/libtelnetlib.tex python/trunk/Doc/lib/liburllib2.tex Log: Added versionchanged flag to all the methods which received a new optional timeout parameter, and a versionadded flag to the socket.create_connection function. Modified: python/trunk/Doc/lib/libftplib.tex ============================================================================== --- python/trunk/Doc/lib/libftplib.tex (original) +++ python/trunk/Doc/lib/libftplib.tex Mon Jun 11 18:27:08 2007 @@ -46,6 +46,7 @@ The optional \var{timeout} parameter specifies a timeout in seconds for the connection attempt (if is not specified, or passed as None, the global default timeout setting will be used). +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{datadesc}{all_errors} @@ -117,6 +118,8 @@ object timeout is used (the timeout that you passed when instantiating the class); if the object timeout is also None, the global default timeout setting will be used. + +\versionchanged[\var{timeout} was added]{2.6} \end{methoddesc} \begin{methoddesc}[FTP]{getwelcome}{} Modified: python/trunk/Doc/lib/libhttplib.tex ============================================================================== --- python/trunk/Doc/lib/libhttplib.tex (original) +++ python/trunk/Doc/lib/libhttplib.tex Mon Jun 11 18:27:08 2007 @@ -49,6 +49,7 @@ >>> h3 = httplib.HTTPConnection('www.cwi.nl', 80, timeout=10) \end{verbatim} \versionadded{2.0} +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{HTTPSConnection}{host\optional{, port\optional{, @@ -63,6 +64,7 @@ \warning{This does not do any certificate verification!} \versionadded{2.0} +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{HTTPResponse}{sock\optional{, debuglevel=0}\optional{, strict=0}} Modified: python/trunk/Doc/lib/libpoplib.tex ============================================================================== --- python/trunk/Doc/lib/libpoplib.tex (original) +++ python/trunk/Doc/lib/libpoplib.tex Mon Jun 11 18:27:08 2007 @@ -35,6 +35,8 @@ The optional \var{timeout} parameter specifies a timeout in seconds for the connection attempt (if not specified, or passed as None, the global default timeout setting will be used). + +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{POP3_SSL}{host\optional{, port\optional{, keyfile\optional{, certfile}}}} Modified: python/trunk/Doc/lib/libsmtplib.tex ============================================================================== --- python/trunk/Doc/lib/libsmtplib.tex (original) +++ python/trunk/Doc/lib/libsmtplib.tex Mon Jun 11 18:27:08 2007 @@ -29,6 +29,8 @@ For normal use, you should only require the initialization/connect, \method{sendmail()}, and \method{quit()} methods. An example is included below. + +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{SMTP_SSL}{\optional{host\optional{, port\optional{, @@ -45,6 +47,8 @@ The optional \var{timeout} parameter specifies a timeout in seconds for the connection attempt (if not specified, or passed as None, the global default timeout setting will be used). + +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{LMTP}{\optional{host\optional{, port\optional{, Modified: python/trunk/Doc/lib/libsocket.tex ============================================================================== --- python/trunk/Doc/lib/libsocket.tex (original) +++ python/trunk/Doc/lib/libsocket.tex Mon Jun 11 18:27:08 2007 @@ -177,6 +177,7 @@ application-level code. Passing the optional \var{timeout} parameter will set the timeout on the socket instance (if it is not given or \code{None}, the global default timeout setting is used). +\versionadded{2.6} \end{funcdesc} \begin{funcdesc}{getaddrinfo}{host, port\optional{, family\optional{, Modified: python/trunk/Doc/lib/libtelnetlib.tex ============================================================================== --- python/trunk/Doc/lib/libtelnetlib.tex (original) +++ python/trunk/Doc/lib/libtelnetlib.tex Mon Jun 11 18:27:08 2007 @@ -40,6 +40,7 @@ raise \exception{EOFError} when the end of the connection is read, because they can return an empty string for other reasons. See the individual descriptions below. +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} @@ -123,6 +124,7 @@ timeout setting will be used). Do not try to reopen an already connected instance. +\versionchanged[\var{timeout} was added]{2.6} \end{methoddesc} \begin{methoddesc}[Telnet]{msg}{msg\optional{, *args}} Modified: python/trunk/Doc/lib/liburllib2.tex ============================================================================== --- python/trunk/Doc/lib/liburllib2.tex (original) +++ python/trunk/Doc/lib/liburllib2.tex Mon Jun 11 18:27:08 2007 @@ -45,6 +45,8 @@ Note that \code{None} may be returned if no handler handles the request (though the default installed global \class{OpenerDirector} uses \class{UnknownHandler} to ensure this never happens). + +\versionchanged[\var{timeout} was added]{2.6} \end{funcdesc} \begin{funcdesc}{install_opener}{opener} @@ -367,6 +369,7 @@ setting will be used; this actually only work for HTTP, HTTPS, FTP and FTPS connections). +\versionchanged[\var{timeout} was added]{2.6} \end{methoddesc} \begin{methoddesc}[OpenerDirector]{error}{proto\optional{, From facundobatista at gmail.com Mon Jun 11 19:19:52 2007 From: facundobatista at gmail.com (Facundo Batista) Date: Mon, 11 Jun 2007 14:19:52 -0300 Subject: [Python-checkins] r55792 - in python/trunk: Doc/lib/liburllib2.tex Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/urllib2.py Misc/NEWS In-Reply-To: References: <20070606171529.03FE61E400D@bag.python.org> Message-ID: 2007/6/6, Georg Brandl : > You need a \versionadded for the timeout parameter. This also applies to > all other locations where you added such a parameter. Done! Thanks Georg and Fred! -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ From python-checkins at python.org Mon Jun 11 20:44:51 2007 From: python-checkins at python.org (georg.brandl) Date: Mon, 11 Jun 2007 20:44:51 +0200 (CEST) Subject: [Python-checkins] r55909 - peps/trunk/pep-3100.txt Message-ID: <20070611184451.D83251E4002@bag.python.org> Author: georg.brandl Date: Mon Jun 11 20:44:47 2007 New Revision: 55909 Modified: peps/trunk/pep-3100.txt Log: Add new additions/removals to PEP 3100. Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Mon Jun 11 20:44:47 2007 @@ -130,6 +130,8 @@ * __getslice__, __setslice__, __delslice__ [#sequence-types]_; remove slice opcodes and use slice objects. [Thomas Wouters is working on this in a branch] +* ``__oct__``, ``__hex__``: use ``__index__`` in ``oct()`` and ``hex()`` + instead. [done] * C APIs (see code): PyFloat_AsString, PyFloat_AsReprString, PyFloat_AsStringEx, PySequence_In, PyEval_EvalFrame, PyEval_CallObject, @@ -178,6 +180,7 @@ argument; suggested use is for objects like float where calling ``__int__()`` has data loss, but an integral representation is still desired? [8]_ * Exception hierarchy changes [#pep352]_ [done] +* Add a ``bin()`` function for a binary representation of integers [done] To be removed: From gki at pldtdsl.net Wed Jun 6 19:27:12 2007 From: gki at pldtdsl.net (Global Knowledge PH) Date: Thu, 7 Jun 2007 01:27:12 +0800 Subject: [Python-checkins] Excellent Customer Service on June 19, 2007 Message-ID: <3071401c7a85f$eb4ab610$2301a8c0@gk7d657bbb3d80> Global Knowledge Associates Invites you to attend: EXCELLENT CUSTOMER SERVICE (1 Day) June 19, 2007 | Tuesday | 9am-5pm P 4,995 / participant (Vat Exclusive) This seminar will help participants increase their customer service skills, develop a greater appreciation of customer value and raise the quality of the service they provide to customers. The seminar includes written individual and group exercises, group discussion, group activities and business simulations designed to create a highly effective learning experience. Participants in this seminar will learn how to: ? How to deliver quality customer service ? To assess their customer service skills and attitudes ? To think creatively in solving customer problems ? How to close the feedback loop in helping customers ? To look at each customer encounter from the customer's point of view ? How to stay calm and effectively deal with difficult customers ? How to do an emotional reset after dealing with negative customers ? How to maintain a positive attitude, day after day Who should attend this seminar? * Managers * Employees at all levels * The seminar can be customized to meet the requirements and the skill level of your group Seminar Topics: * Understanding the value of quality customer service * How customers perceive you and the importance of customer perception * Treating customers as guests * The power and value of a positive attitude * Giving quality customer service when you don't feel like it * Taking care of yourself and your customers * Your role as a customer consultant * Dealing effectively with difficult and off-the-wall customers * Choose to respond rather than react * The value of empathy * The most common reasons customers complain * Negotiating win-win solutions to customer service dilemmas * The team of you and your customer * The importance of keeping promises * Customer styles & customer service styles * Valuing your opportunity to serve * Having fun and enjoying your work Registration & Information Seat in this workshop is limited. Please register and settle payment early to reserve a slot. Further details, please call Roselle at (632) 683-0969 / 637-3657 or via email sally at globalknowledgeph.com. REGISTER NOW! GLOBALKNOWLEDGE ASSOCIATES, INC. Unit 2502B West Tower, PSE Bldg, Exchange Road, Ortigas Center, Pasig City, Philippines Tel. Nos. (632) 683-0969 / 637-3657 Email: sally at globalknowledgeph.com _____ If you want to unsubscribe from this mailing list. Please Click it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-checkins/attachments/20070607/9ecad98b/attachment.html From nnorwitz at gmail.com Mon Jun 11 23:08:29 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 11 Jun 2007 17:08:29 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070611210829.GA9316@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Tue Jun 12 04:58:09 2007 From: python-checkins at python.org (skip.montanaro) Date: Tue, 12 Jun 2007 04:58:09 +0200 (CEST) Subject: [Python-checkins] r55922 - tracker/instances/python-dev/detectors/spamcheck.py Message-ID: <20070612025809.094811E400F@bag.python.org> Author: skip.montanaro Date: Tue Jun 12 04:58:04 2007 New Revision: 55922 Modified: tracker/instances/python-dev/detectors/spamcheck.py Log: adjust for the proxied server running on www.webfast.com Modified: tracker/instances/python-dev/detectors/spamcheck.py ============================================================================== --- tracker/instances/python-dev/detectors/spamcheck.py (original) +++ tracker/instances/python-dev/detectors/spamcheck.py Tue Jun 12 04:58:04 2007 @@ -9,10 +9,8 @@ which snuck by the screen. """ -# These must match the xmlrpc_{host,port,path} settings in the SpamBayes -# server config. -HOST = "localhost" -PORT = "8001" +HOST = "www.webfast.com" +PORT = "80" PATH = "/sbrpc" # These must match the {ham,spam}_cutoff setting in the SpamBayes server From nnorwitz at gmail.com Tue Jun 12 11:08:58 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 12 Jun 2007 05:08:58 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070612090858.GA30123@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Tue Jun 12 11:09:59 2007 From: python-checkins at python.org (marc-andre.lemburg) Date: Tue, 12 Jun 2007 11:09:59 +0200 (CEST) Subject: [Python-checkins] r55926 - python/trunk/Lib/platform.py Message-ID: <20070612090959.6E5A01E4002@bag.python.org> Author: marc-andre.lemburg Date: Tue Jun 12 11:09:58 2007 New Revision: 55926 Modified: python/trunk/Lib/platform.py Log: Apply patch #1734945 to support TurboLinux as distribution. Modified: python/trunk/Lib/platform.py ============================================================================== --- python/trunk/Lib/platform.py (original) +++ python/trunk/Lib/platform.py Tue Jun 12 11:09:58 2007 @@ -242,7 +242,7 @@ _supported_dists = ('SuSE', 'debian', 'fedora', 'redhat', 'centos', 'mandrake', 'rocks', 'slackware', 'yellowdog', - 'gentoo', 'UnitedLinux') + 'gentoo', 'UnitedLinux', 'turbolinux') def _parse_release_file(firstline): From python-checkins at python.org Tue Jun 12 11:26:53 2007 From: python-checkins at python.org (marc-andre.lemburg) Date: Tue, 12 Jun 2007 11:26:53 +0200 (CEST) Subject: [Python-checkins] r55927 - python/trunk/Lib/platform.py Message-ID: <20070612092653.2A0CC1E400D@bag.python.org> Author: marc-andre.lemburg Date: Tue Jun 12 11:26:49 2007 New Revision: 55927 Modified: python/trunk/Lib/platform.py Log: Add patch #1726668: Windows Vista support. Modified: python/trunk/Lib/platform.py ============================================================================== --- python/trunk/Lib/platform.py (original) +++ python/trunk/Lib/platform.py Tue Jun 12 11:26:49 2007 @@ -600,6 +600,16 @@ release = '2003Server' else: release = 'post2003' + elif maj == 6: + if min == 0: + # Per http://msdn2.microsoft.com/en-us/library/ms724429.aspx + productType = GetVersionEx(1)[8] + if productType == 1: # VER_NT_WORKSTATION + release = 'Vista' + else: + release = '2008Server' + else: + release = 'post2008Server' else: if not release: # E.g. Win3.1 with win32s @@ -1068,6 +1078,16 @@ # (_syscmd_ver() tends to return the vendor name as well) if system == 'Microsoft Windows': system = 'Windows' + elif system == 'Microsoft' and release == 'Windows': + # Under Windows Vista and Windows Server 2008, + # Microsoft changed the output of the ver command. The + # release is no longer printed. This causes the + # system and release to be misidentified. + system = 'Windows' + if '6.0' == version[:3]: + release = 'Vista' + else: + release = '' # In case we still don't know anything useful, we'll try to # help ourselves From buildbot at python.org Tue Jun 12 11:47:59 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 09:47:59 +0000 Subject: [Python-checkins] buildbot warnings in ppc Debian unstable trunk Message-ID: <20070612094800.08DD41E4002@bag.python.org> The Buildbot has detected a new failure of ppc Debian unstable trunk. Full details are available at: http://www.python.org/dev/buildbot/all/ppc%2520Debian%2520unstable%2520trunk/builds/24 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: facundo.batista,marc-andre.lemburg Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_bsddb3 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Tue Jun 12 13:13:21 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 11:13:21 +0000 Subject: [Python-checkins] buildbot warnings in alpha Debian trunk Message-ID: <20070612111322.093C31E4005@bag.python.org> The Buildbot has detected a new failure of alpha Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/alpha%2520Debian%2520trunk/builds/18 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: facundo.batista,marc-andre.lemburg Build had warnings: warnings test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Tue Jun 12 17:36:26 2007 From: python-checkins at python.org (thomas.heller) Date: Tue, 12 Jun 2007 17:36:26 +0200 (CEST) Subject: [Python-checkins] r55929 - python/trunk/Tools/buildbot/build-amd64.bat python/trunk/Tools/buildbot/external-amd64.bat Message-ID: <20070612153626.46F8D1E4004@bag.python.org> Author: thomas.heller Date: Tue Jun 12 17:36:22 2007 New Revision: 55929 Added: python/trunk/Tools/buildbot/external-amd64.bat (contents, props changed) Modified: python/trunk/Tools/buildbot/build-amd64.bat Log: Checkout, but do not yet try to build, exernal sources. Modified: python/trunk/Tools/buildbot/build-amd64.bat ============================================================================== --- python/trunk/Tools/buildbot/build-amd64.bat (original) +++ python/trunk/Tools/buildbot/build-amd64.bat Tue Jun 12 17:36:22 2007 @@ -1,5 +1,6 @@ @rem Used by the buildbot "compile" step. -REM cmd /c Tools\buildbot\external.bat +setlocal +cmd /c Tools\buildbot\external-amd64.bat call "%VS71COMNTOOLS%vsvars32.bat" REM cmd /q/c Tools\buildbot\kill_python.bat devenv.com /build ReleaseAMD64 PCbuild\pcbuild.sln Added: python/trunk/Tools/buildbot/external-amd64.bat ============================================================================== --- (empty file) +++ python/trunk/Tools/buildbot/external-amd64.bat Tue Jun 12 17:36:22 2007 @@ -0,0 +1,29 @@ + at rem Fetches (and builds if necessary) external dependencies +setlocal + + at rem Assume we start inside the Python source directory +cd .. + + at rem sqlite +if not exist sqlite-source-3.3.4 ( + svn export http://svn.python.org/projects/external/sqlite-source-3.3.4 + if exist trunk\PCbuild\sqlite3.dll del trunk\PCbuild\sqlite3.dll +) + + at rem bzip +if not exist bzip2-1.0.3 svn export http://svn.python.org/projects/external/bzip2-1.0.3 + + at rem Sleepycat db +call "%MSSdk%\SetEnv" /XP64 /RETAIL +if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20 + + at rem OpenSSL +if not exist openssl-0.9.8a svn export http://svn.python.org/projects/external/openssl-0.9.8a + + at rem tcltk +if not exist tcl8.4.12 ( + if exist tcltk rd /s/q tcltk + svn export http://svn.python.org/projects/external/tcl8.4.12 + svn export http://svn.python.org/projects/external/tk8.4.12 +) + From python-checkins at python.org Tue Jun 12 18:08:30 2007 From: python-checkins at python.org (thomas.heller) Date: Tue, 12 Jun 2007 18:08:30 +0200 (CEST) Subject: [Python-checkins] r55930 - python/trunk/PCbuild/_ssl.mak python/trunk/PCbuild/build_ssl.bat Message-ID: <20070612160830.53F9F1E4005@bag.python.org> Author: thomas.heller Date: Tue Jun 12 18:08:27 2007 New Revision: 55930 Modified: python/trunk/PCbuild/_ssl.mak python/trunk/PCbuild/build_ssl.bat Log: Add bufferoverflowU.lib to the libraries needed by _ssl (is this the right thing to do?). Set the /XP64 /RETAIL build enviroment in the makefile when building ReleaseAMD64. Modified: python/trunk/PCbuild/_ssl.mak ============================================================================== --- python/trunk/PCbuild/_ssl.mak (original) +++ python/trunk/PCbuild/_ssl.mak Tue Jun 12 18:08:27 2007 @@ -26,12 +26,12 @@ @if not exist "$(TEMP)/_ssl/." mkdir "$(TEMP)/_ssl" cl /nologo /c $(SSL_SOURCE) $(CFLAGS) /Fo$(TEMP)\_ssl\$*.obj $(INCLUDES) link /nologo @<< - /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) + /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) bufferoverflowU.lib << _hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../PC/*.h ../Include/*.h @if not exist "$(TEMP)/_hashlib/." mkdir "$(TEMP)/_hashlib" cl /nologo /c $(HASH_SOURCE) $(CFLAGS) $(EXTRA_CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES) link /nologo @<< - /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(TEMP)\_hashlib\$*.obj + /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(TEMP)\_hashlib\$*.obj bufferoverflowU.lib << Modified: python/trunk/PCbuild/build_ssl.bat ============================================================================== --- python/trunk/PCbuild/build_ssl.bat (original) +++ python/trunk/PCbuild/build_ssl.bat Tue Jun 12 18:08:27 2007 @@ -1,3 +1,5 @@ +if "%1" == "ReleaseAMD64" call "%MSSdk%\SetEnv" /XP64 /RETAIL + @echo off if not defined HOST_PYTHON ( if %1 EQU Debug ( From buildbot at python.org Tue Jun 12 18:15:38 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 16:15:38 +0000 Subject: [Python-checkins] buildbot failure in x86 W2k trunk Message-ID: <20070612161538.ECD251E400D@bag.python.org> The Buildbot has detected a new failure of x86 W2k trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520W2k%2520trunk/builds/367 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller BUILD FAILED: failed compile sincerely, -The Buildbot From buildbot at python.org Tue Jun 12 18:18:54 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 16:18:54 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-3 trunk Message-ID: <20070612161854.820C31E400C@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%2520trunk/builds/51 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_bsddb3 sincerely, -The Buildbot From python-checkins at python.org Tue Jun 12 18:23:21 2007 From: python-checkins at python.org (thomas.heller) Date: Tue, 12 Jun 2007 18:23:21 +0200 (CEST) Subject: [Python-checkins] r55931 - python/trunk/PCbuild/_ssl.mak Message-ID: <20070612162321.B83211E4002@bag.python.org> Author: thomas.heller Date: Tue Jun 12 18:23:19 2007 New Revision: 55931 Modified: python/trunk/PCbuild/_ssl.mak Log: Revert this change, since it breaks the win32 build: Add bufferoverflowU.lib to the libraries needed by _ssl (is this the right thing to do?). Modified: python/trunk/PCbuild/_ssl.mak ============================================================================== --- python/trunk/PCbuild/_ssl.mak (original) +++ python/trunk/PCbuild/_ssl.mak Tue Jun 12 18:23:19 2007 @@ -26,12 +26,12 @@ @if not exist "$(TEMP)/_ssl/." mkdir "$(TEMP)/_ssl" cl /nologo /c $(SSL_SOURCE) $(CFLAGS) /Fo$(TEMP)\_ssl\$*.obj $(INCLUDES) link /nologo @<< - /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) bufferoverflowU.lib + /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) << _hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../PC/*.h ../Include/*.h @if not exist "$(TEMP)/_hashlib/." mkdir "$(TEMP)/_hashlib" cl /nologo /c $(HASH_SOURCE) $(CFLAGS) $(EXTRA_CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES) link /nologo @<< - /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(TEMP)\_hashlib\$*.obj bufferoverflowU.lib + /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(TEMP)\_hashlib\$*.obj << From buildbot at python.org Tue Jun 12 18:23:28 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 16:23:28 +0000 Subject: [Python-checkins] buildbot failure in x86 XP-3 trunk Message-ID: <20070612162328.4B6BF1E4005@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 trunk. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%2520trunk/builds/52 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller BUILD FAILED: failed compile sincerely, -The Buildbot From python-checkins at python.org Tue Jun 12 19:28:35 2007 From: python-checkins at python.org (thomas.heller) Date: Tue, 12 Jun 2007 19:28:35 +0200 (CEST) Subject: [Python-checkins] r55934 - python/trunk/PCbuild/_ssl.mak python/trunk/PCbuild/build_ssl.py Message-ID: <20070612172835.7AAB81E4004@bag.python.org> Author: thomas.heller Date: Tue Jun 12 19:28:31 2007 New Revision: 55934 Modified: python/trunk/PCbuild/_ssl.mak python/trunk/PCbuild/build_ssl.py Log: Specify the bufferoverflowU.lib to the makefile on the command line (for ReleaseAMD64 builds). Modified: python/trunk/PCbuild/_ssl.mak ============================================================================== --- python/trunk/PCbuild/_ssl.mak (original) +++ python/trunk/PCbuild/_ssl.mak Tue Jun 12 19:28:31 2007 @@ -1,3 +1,4 @@ +EXTRA_LIBS= !IFDEF DEBUG SUFFIX=_d.pyd @@ -26,12 +27,12 @@ @if not exist "$(TEMP)/_ssl/." mkdir "$(TEMP)/_ssl" cl /nologo /c $(SSL_SOURCE) $(CFLAGS) /Fo$(TEMP)\_ssl\$*.obj $(INCLUDES) link /nologo @<< - /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) + /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) $(EXTRA_LIBS) << _hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../PC/*.h ../Include/*.h @if not exist "$(TEMP)/_hashlib/." mkdir "$(TEMP)/_hashlib" cl /nologo /c $(HASH_SOURCE) $(CFLAGS) $(EXTRA_CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES) link /nologo @<< - /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(TEMP)\_hashlib\$*.obj + /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(EXTRA_LIBS) $(TEMP)\_hashlib\$*.obj << Modified: python/trunk/PCbuild/build_ssl.py ============================================================================== --- python/trunk/PCbuild/build_ssl.py (original) +++ python/trunk/PCbuild/build_ssl.py Tue Jun 12 19:28:31 2007 @@ -170,7 +170,7 @@ if debug: defs = defs + " " + "DEBUG=1" if arch in ('amd64', 'ia64'): - defs = defs + " EXTRA_CFLAGS=/GS-" + defs = defs + " EXTRA_CFLAGS=/GS- EXTRA_LIBS=bufferoverflowU.lib" makeCommand = 'nmake /nologo -f _ssl.mak ' + defs + " " + make_flags print "Executing:", makeCommand sys.stdout.flush() From buildbot at python.org Tue Jun 12 20:06:50 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 18:06:50 +0000 Subject: [Python-checkins] buildbot warnings in ppc Debian unstable trunk Message-ID: <20070612180650.0E6361E4004@bag.python.org> The Buildbot has detected a new failure of ppc Debian unstable trunk. Full details are available at: http://www.python.org/dev/buildbot/all/ppc%2520Debian%2520unstable%2520trunk/builds/29 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_bsddb3 make: *** [buildbottest] Error 1 sincerely, -The Buildbot From buildbot at python.org Tue Jun 12 21:02:02 2007 From: buildbot at python.org (buildbot at python.org) Date: Tue, 12 Jun 2007 19:02:02 +0000 Subject: [Python-checkins] buildbot warnings in alpha Debian trunk Message-ID: <20070612190204.1A3401E4002@bag.python.org> The Buildbot has detected a new failure of alpha Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/alpha%2520Debian%2520trunk/builds/21 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home/pybot/buildarea/trunk.klose-debian-alpha/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Tue Jun 12 21:03:05 2007 From: python-checkins at python.org (thomas.heller) Date: Tue, 12 Jun 2007 21:03:05 +0200 (CEST) Subject: [Python-checkins] r55937 - in python/trunk: PCbuild/_bsddb.vcproj Tools/buildbot/external-amd64.bat Message-ID: <20070612190305.594F01E4009@bag.python.org> Author: thomas.heller Date: Tue Jun 12 21:02:59 2007 New Revision: 55937 Modified: python/trunk/PCbuild/_bsddb.vcproj python/trunk/Tools/buildbot/external-amd64.bat Log: Add bufferoverflowU.lib to PCBuild\_bsddb.vcproj. Build sqlite3.dll and bsddb. Modified: python/trunk/PCbuild/_bsddb.vcproj ============================================================================== --- python/trunk/PCbuild/_bsddb.vcproj (original) +++ python/trunk/PCbuild/_bsddb.vcproj Tue Jun 12 21:02:59 2007 @@ -213,7 +213,7 @@ Author: thomas.heller Date: Tue Jun 12 21:56:12 2007 New Revision: 55938 Modified: python/trunk/Tools/buildbot/external-amd64.bat Log: Don't rebuild Berkeley DB if not needed (this was committed by accident). Modified: python/trunk/Tools/buildbot/external-amd64.bat ============================================================================== --- python/trunk/Tools/buildbot/external-amd64.bat (original) +++ python/trunk/Tools/buildbot/external-amd64.bat Tue Jun 12 21:56:12 2007 @@ -27,7 +27,7 @@ @rem Sleepycat db if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20 -if not exist "db-4.4.20\build_win32\Release_AMD64\libdb44s.lib_XXX" ( +if not exist "db-4.4.20\build_win32\Release_AMD64\libdb44s.lib" ( cd db-4.4.20\build_win32 devenv Berkeley_DB.sln /build "Release AMD64" /project db_static /useenv cd ..\.. From nnorwitz at gmail.com Tue Jun 12 22:16:14 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 12 Jun 2007 16:16:14 -0400 Subject: [Python-checkins] Python Regression Test Failures opt (1) Message-ID: <20070612201614.GA30241@python.psfb.org> test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_unittest test_doctest test_doctest2 test_MimeWriter test_StringIO test___all__ test___future__ test__locale test_aepack test_aepack skipped -- No module named aepack test_al test_al skipped -- No module named al test_anydbm test_applesingle test_applesingle skipped -- No module named macostools test_array test_ast test_asynchat test_atexit test_audioop test_augassign test_base64 test_bastion test_bigaddrspace test_bigmem test_binascii test_binhex test_binop test_bisect test_bool test_bsddb test_bsddb185 test_bsddb185 skipped -- No module named bsddb185 test_bsddb3 test_bsddb3 skipped -- Use of the `bsddb' resource not enabled test_bufio test_bz2 test_cProfile test_calendar test_call test_capi test_cd test_cd skipped -- No module named cd test_cfgparser test_cgi test_charmapcodec test_cl test_cl skipped -- No module named cl test_class test_cmath test_cmd_line test_code test_codeccallbacks test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecmaps_cn test_codecmaps_cn skipped -- Use of the `urlfetch' resource not enabled test_codecmaps_hk test_codecmaps_hk skipped -- Use of the `urlfetch' resource not enabled test_codecmaps_jp test_codecmaps_jp skipped -- Use of the `urlfetch' resource not enabled test_codecmaps_kr test_codecmaps_kr skipped -- Use of the `urlfetch' resource not enabled test_codecmaps_tw test_codecmaps_tw skipped -- Use of the `urlfetch' resource not enabled test_codecs test_codeop test_coding test_coercion test_collections test_colorsys test_commands test_compare test_compile test_compiler test_complex test_complex_args test_contains test_contextlib test_cookie test_cookielib test_copy test_copy_reg test_cpickle test_crypt test_csv test_ctypes test_curses test_curses skipped -- Use of the `curses' resource not enabled test_datetime test_dbm test_decimal test_decorators test_defaultdict test_deque test_descr test_descrtut test_difflib test_dircache test_dis test_distutils [9008 refs] test_dl test_dumbdbm test_dummy_thread test_dummy_threading test_email test_email_codecs test_email_renamed test_enumerate test_eof test_errno test_exception_variations test_extcall test_fcntl test_file test_filecmp test_fileinput test_float test_fnmatch test_fork1 test_format test_fpformat test_frozen test_ftplib test test_ftplib failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.6/test/test_ftplib.py", line 42, in testBasic ftp = ftplib.FTP("localhost") File "/tmp/python-test/local/lib/python2.6/ftplib.py", line 114, in __init__ self.connect(host) File "/tmp/python-test/local/lib/python2.6/ftplib.py", line 129, in connect self.sock = socket.create_connection((self.host, self.port), self.timeout) File "/tmp/python-test/local/lib/python2.6/socket.py", line 443, in create_connection raise error, msg error: (111, 'Connection refused') test_funcattrs test_functools test_future test_gc test_gdbm test_generators test_genericpath test_genexps test_getargs test_getargs2 test_getopt test_gettext test_gl test_gl skipped -- No module named gl test_glob test_global test_grp test_gzip test_hash test_hashlib test_heapq test_hexoct test_hmac test_hotshot test_htmllib test_htmlparser test_httplib test_imageop test_imageop skipped -- No module named imgfile test_imaplib test_imgfile test_imgfile skipped -- No module named imgfile test_imp test_import test_importhooks test_index test_inspect test_ioctl test_ioctl skipped -- Unable to open /dev/tty test_isinstance test_iter test_iterlen test_itertools test_largefile test_linuxaudiodev test_linuxaudiodev skipped -- Use of the `audio' resource not enabled test_list test_locale test_logging test_long test_long_future test_longexp test_macostools test_macostools skipped -- No module named macostools test_macpath test_mailbox test_marshal test_math test_md5 test_mhlib test_mimetools test_mimetypes test_minidom test_mmap test_module test_modulefinder test_multibytecodec test_multibytecodec_support test_multifile test_mutants test_netrc test_new test_nis test_normalization test_normalization skipped -- Use of the `urlfetch' resource not enabled test_ntpath test_old_mailbox test_openpty test_operator test_optparse test_os test_ossaudiodev test_ossaudiodev skipped -- Use of the `audio' resource not enabled test_parser test_peepholer test_pep247 test_pep263 test_pep277 test_pep277 skipped -- test works only on NT+ test_pep292 test_pep352 test_pickle test_pickletools test_pkg test_pkgimport test_platform test_plistlib test_plistlib skipped -- No module named plistlib test_poll test_popen [7328 refs] [7328 refs] [7328 refs] test_popen2 test_poplib test_posix test_posixpath test_pow test_pprint test_profile test_profilehooks test_pty test_pwd test_pyclbr test_pyexpat test_queue test_quopri [7703 refs] [7703 refs] test_random test_re test_repr test_resource test_rfc822 test_richcmp test_robotparser test_runpy test_sax test_scope test_scriptpackages test_scriptpackages skipped -- No module named aetools test_select test_set test_sets test_sgmllib test_sha test_shelve test_shlex test_shutil test_signal test_site test_slice test_smtplib test_socket test_socket_ssl test_socketserver test_socketserver skipped -- Use of the `network' resource not enabled test_softspace test_sort test_sqlite test_startfile test_startfile skipped -- cannot import name startfile test_str test_strftime test_string test_stringprep test_strop test_strptime test_struct test_structmembers test_structmembers skipped -- cannot import name LLONG_MAX test_structseq test_subprocess [7323 refs] [7321 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7321 refs] [8869 refs] [7539 refs] [7324 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] . [7323 refs] [7323 refs] this bit of output is from a test of stdout in a different process ... [7323 refs] [7323 refs] [7539 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [7323 refs] [7323 refs] test_tarfile test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [7327 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading test_threading_local test_threadsignals test_time test_timeout test_timeout skipped -- Use of the `network' resource not enabled test_tokenize test_trace test_traceback test_transformer test_tuple test_ucn test_unary test_unicode test_unicode_file test_unicode_file skipped -- No Unicode filesystem semantics on this platform. test_unicodedata test_univnewlines test_unpack test_urllib test_urllib2 test_urllib2_localnet test_urllib2net test_urllib2net skipped -- Use of the `network' resource not enabled test_urllibnet test_urllibnet skipped -- Use of the `network' resource not enabled test_urlparse test_userdict test_userlist test_userstring test_uu test_uuid WARNING: uuid.getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._ifconfig_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._unixdll_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. test_wait3 test_wait4 test_warnings test_wave test_weakref test_whichdb test_winreg test_winreg skipped -- No module named _winreg test_winsound test_winsound skipped -- No module named winsound test_with test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile test_zipfile64 test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run test_zipimport test_zlib 289 tests OK. 1 test failed: test_ftplib 36 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_gl test_imageop test_imgfile test_ioctl test_linuxaudiodev test_macostools test_normalization test_ossaudiodev test_pep277 test_plistlib test_scriptpackages test_socketserver test_startfile test_structmembers test_sunaudiodev test_tcl test_timeout test_unicode_file test_urllib2net test_urllibnet test_winreg test_winsound test_zipfile64 2 skips unexpected on linux2: test_ioctl test_structmembers [483706 refs] From nnorwitz at gmail.com Tue Jun 12 23:17:14 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 12 Jun 2007 17:17:14 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070612211714.GA5958@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Tue Jun 12 23:19:26 2007 From: python-checkins at python.org (collin.winter) Date: Tue, 12 Jun 2007 23:19:26 +0200 (CEST) Subject: [Python-checkins] r55940 - peps/trunk/pep-0008.txt peps/trunk/pep-3134.txt Message-ID: <20070612211926.75EA51E400A@bag.python.org> Author: collin.winter Date: Tue Jun 12 23:19:21 2007 New Revision: 55940 Modified: peps/trunk/pep-0008.txt peps/trunk/pep-3134.txt Log: Convert two usages of StandardError into Exception. Modified: peps/trunk/pep-0008.txt ============================================================================== --- peps/trunk/pep-0008.txt (original) +++ peps/trunk/pep-0008.txt Tue Jun 12 23:19:21 2007 @@ -692,7 +692,7 @@ A bare 'except:' clause will catch SystemExit and KeyboardInterrupt exceptions, making it harder to interrupt a program with Control-C, and can disguise other problems. If you want to catch all - exceptions that signal program errors, use 'except StandardError:'. + exceptions that signal program errors, use 'except Exception:'. A good rule of thumb is to limit use of bare 'except' clauses to two cases: Modified: peps/trunk/pep-3134.txt ============================================================================== --- peps/trunk/pep-3134.txt (original) +++ peps/trunk/pep-3134.txt Tue Jun 12 23:19:21 2007 @@ -231,7 +231,7 @@ so that the client doesn't have to be aware of the storage-specific details, but doesn't want to lose the underlying error information. - class DatabaseError(StandardError): + class DatabaseError(Exception): pass class FileDatabase(Database): From python-checkins at python.org Tue Jun 12 23:24:22 2007 From: python-checkins at python.org (collin.winter) Date: Tue, 12 Jun 2007 23:24:22 +0200 (CEST) Subject: [Python-checkins] r55941 - peps/trunk/pep-3100.txt Message-ID: <20070612212422.A3CBC1E400B@bag.python.org> Author: collin.winter Date: Tue Jun 12 23:24:20 2007 New Revision: 55941 Modified: peps/trunk/pep-3100.txt Log: Mark the removal of StandardError as done. Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Tue Jun 12 23:24:20 2007 @@ -194,7 +194,7 @@ * ``reduce()``: write a loop instead [2]_, [9]_ [done] * ``xrange()``: use ``range()`` instead [1]_ [See range() above] [done] * ``StandardError``: this is a relic from the original exception hierachy; subclass - ``Exception`` instead. + ``Exception`` instead. [done] Standard library From python-checkins at python.org Wed Jun 13 00:47:16 2007 From: python-checkins at python.org (collin.winter) Date: Wed, 13 Jun 2007 00:47:16 +0200 (CEST) Subject: [Python-checkins] r55942 - sandbox/trunk/2to3/fixes/util.py Message-ID: <20070612224716.3064F1E4002@bag.python.org> Author: collin.winter Date: Wed Jun 13 00:47:09 2007 New Revision: 55942 Modified: sandbox/trunk/2to3/fixes/util.py Log: Whitespace fixes. Modified: sandbox/trunk/2to3/fixes/util.py ============================================================================== --- sandbox/trunk/2to3/fixes/util.py (original) +++ sandbox/trunk/2to3/fixes/util.py Wed Jun 13 00:47:09 2007 @@ -21,7 +21,7 @@ def LParen(): return Leaf(token.LPAR, "(") - + def RParen(): return Leaf(token.RPAR, ")") @@ -71,11 +71,11 @@ return Node(syms.trailer, [Leaf(token.LBRACE, '['), index_node, Leaf(token.RBRACE, ']')]) - + def String(string, prefix=None): """A string leaf""" return Leaf(token.STRING, string, prefix=prefix) - + ########################################################### ### Determine whether a node represents a given literal ########################################################### @@ -88,7 +88,7 @@ and isinstance(node.children[1], Node) and isinstance(node.children[2], Leaf) and node.children[0].value == "(" - and node.children[2].value == ")") + and node.children[2].value == ")") def is_list(node): """Does the node represent a list literal?""" @@ -103,7 +103,7 @@ ### Common portability code. This allows fixers to do, eg, ### "from fixes.util import set" and forget about it. ########################################################### - + try: any = any except NameError: @@ -117,7 +117,7 @@ set = set except NameError: from sets import Set as set - + try: reversed = reversed except NameError: From python-checkins at python.org Wed Jun 13 05:42:22 2007 From: python-checkins at python.org (martin.v.loewis) Date: Wed, 13 Jun 2007 05:42:22 +0200 (CEST) Subject: [Python-checkins] r55948 - python/trunk/Include/pyport.h Message-ID: <20070613034222.7C2D31E4002@bag.python.org> Author: martin.v.loewis Date: Wed Jun 13 05:42:19 2007 New Revision: 55948 Modified: python/trunk/Include/pyport.h Log: Provide PY_LLONG_MAX on all systems having long long. Will backport to 2.5. Modified: python/trunk/Include/pyport.h ============================================================================== --- python/trunk/Include/pyport.h (original) +++ python/trunk/Include/pyport.h Wed Jun 13 05:42:19 2007 @@ -62,14 +62,20 @@ #ifndef PY_LONG_LONG #define PY_LONG_LONG long long #if defined(LLONG_MAX) +/* If LLONG_MAX is defined in limits.h, use that. */ #define PY_LLONG_MIN LLONG_MIN #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX -#elif defined(__s390__) -/* Apparently, S390 Linux has long long, but no LLONG_MAX */ -#define PY_LLONG_MAX 9223372036854775807LL +#elif defined(__LONG_LONG_MAX__) +/* Otherwise, if GCC has a builtin define, use that. */ +#define PY_LLONG_MAX __LONG_LONG_MAX__ +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL) +#else +/* Otherwise, rely on two's complement. */ +#define PY_ULLONG_MAX (~0ULL) +#define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) #define PY_LLONG_MIN (-PY_LLONG_MAX-1) -#define PY_ULLONG_MAX 18446744073709551615ULL #endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ From python-checkins at python.org Wed Jun 13 05:42:58 2007 From: python-checkins at python.org (martin.v.loewis) Date: Wed, 13 Jun 2007 05:42:58 +0200 (CEST) Subject: [Python-checkins] r55949 - python/branches/release25-maint/Include/pyport.h Message-ID: <20070613034258.B5C8A1E4002@bag.python.org> Author: martin.v.loewis Date: Wed Jun 13 05:42:55 2007 New Revision: 55949 Modified: python/branches/release25-maint/Include/pyport.h Log: Provide PY_LLONG_MAX on all systems having long long. Modified: python/branches/release25-maint/Include/pyport.h ============================================================================== --- python/branches/release25-maint/Include/pyport.h (original) +++ python/branches/release25-maint/Include/pyport.h Wed Jun 13 05:42:55 2007 @@ -62,14 +62,20 @@ #ifndef PY_LONG_LONG #define PY_LONG_LONG long long #if defined(LLONG_MAX) +/* If LLONG_MAX is defined in limits.h, use that. */ #define PY_LLONG_MIN LLONG_MIN #define PY_LLONG_MAX LLONG_MAX #define PY_ULLONG_MAX ULLONG_MAX -#elif defined(__s390__) -/* Apparently, S390 Linux has long long, but no LLONG_MAX */ -#define PY_LLONG_MAX 9223372036854775807LL +#elif defined(__LONG_LONG_MAX__) +/* Otherwise, if GCC has a builtin define, use that. */ +#define PY_LLONG_MAX __LONG_LONG_MAX__ +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL) +#else +/* Otherwise, rely on two's complement. */ +#define PY_ULLONG_MAX (~0ULL) +#define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) #define PY_LLONG_MIN (-PY_LLONG_MAX-1) -#define PY_ULLONG_MAX 18446744073709551615ULL #endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ From buildbot at python.org Wed Jun 13 06:26:21 2007 From: buildbot at python.org (buildbot at python.org) Date: Wed, 13 Jun 2007 04:26:21 +0000 Subject: [Python-checkins] buildbot warnings in sparc solaris10 gcc trunk Message-ID: <20070613042622.85B131E4002@bag.python.org> The Buildbot has detected a new failure of sparc solaris10 gcc trunk. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%2520solaris10%2520gcc%2520trunk/builds/2104 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/opt/users/buildbot/slave/trunk.loewis-sun/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list 1 test failed: test_socketserver sincerely, -The Buildbot From python-checkins at python.org Wed Jun 13 06:31:00 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 13 Jun 2007 06:31:00 +0200 (CEST) Subject: [Python-checkins] r55950 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070613043100.E49701E4002@bag.python.org> Author: brett.cannon Date: Wed Jun 13 06:30:56 2007 New Revision: 55950 Modified: sandbox/trunk/import_in_py/pseudocode.py Log: Clean up comments. Modified: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- sandbox/trunk/import_in_py/pseudocode.py (original) +++ sandbox/trunk/import_in_py/pseudocode.py Wed Jun 13 06:30:56 2007 @@ -8,14 +8,17 @@ Caveats: + Classic relative import semantics are not covered. + Assume all code runs with the import lock held. + + Some structure (e.g., using importers for built-in and frozen + modules) is purely conceptual and not used in the C + implementation of import. """ path = globals.get('__path__') # If a relative import, figure out absolute name of requested module. if level != 0: # Adjust relative import based on whether caller is a package and - # the specified level. - # Make sure import does not go beyond top-level. + # the specified level in the call. + # Also make sure import does not go beyond top-level. name = resolve_name(name, globals['__name__'], path, level) # Import each parent in the name, starting at the top. # Assume each_parent iterates through each parent of the module request, @@ -24,6 +27,7 @@ # import should be followed by 'continue' to let the next module be # imported. for parent in each_parent(name): + # If the module is already cached in sys.modules then move along. if parent in sys.modules: continue # Search sys.meta_path. @@ -89,19 +93,18 @@ # With the module now imported and store in sys.modules, figure out exactly # what module to return based on fromlist and how the module name was # specified. - # If fromlist is empty, return the module top-most parent module based on - # whether the import was relative or not. if not fromlist: + # The fromlist is empty, so return the top-most parent module. + # Whether the import was relative or absolute must be considered. if level: return top_relative_name(name, level) else: return sys.modules[name.split('.', 1)[0]] - # If fromlist is not empty, return the module as directly specified in the - # import. - # Must also handle possible imports of modules if the module imported was a - # package and thus names in the fromlist are modules within the package and - # not object within a module. else: + # As fromlist is not empty, return the module specified by the import. + # Must also handle possible imports of modules if the module imported + # was a package and thus names in the fromlist are modules within the + # package and not object within a module. module = sys.modules[name] # If not a module, then can just return the module as the names # specified in fromlist are supposed to be attributes on the module. From buildbot at python.org Wed Jun 13 06:44:14 2007 From: buildbot at python.org (buildbot at python.org) Date: Wed, 13 Jun 2007 04:44:14 +0000 Subject: [Python-checkins] buildbot warnings in S-390 Debian trunk Message-ID: <20070613044414.2C0AC1E4002@bag.python.org> The Buildbot has detected a new failure of S-390 Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/S-390%2520Debian%2520trunk/builds/1023 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_urllibnet make: *** [buildbottest] Error 1 sincerely, -The Buildbot From python-checkins at python.org Wed Jun 13 06:51:53 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 13 Jun 2007 06:51:53 +0200 (CEST) Subject: [Python-checkins] r55951 - sandbox/trunk/import_in_py/importlib.py Message-ID: <20070613045153.344111E4004@bag.python.org> Author: brett.cannon Date: Wed Jun 13 06:51:50 2007 New Revision: 55951 Modified: sandbox/trunk/import_in_py/importlib.py Log: Add a comment about moving over to using imp.get_suffixes() for specifying the suffices for Python source and bytecode files. Modified: sandbox/trunk/import_in_py/importlib.py ============================================================================== --- sandbox/trunk/import_in_py/importlib.py (original) +++ sandbox/trunk/import_in_py/importlib.py Wed Jun 13 06:51:50 2007 @@ -419,6 +419,8 @@ Not specifying handles will lead to reasonable defaults being used. """ + # XXX Move over to use imp.get_suffixes(); make sure no bad assumptions + # made about suffix being a one-item tuple. if source_handles is None: self.source_handles = ('.py',) else: From python-checkins at python.org Wed Jun 13 06:53:25 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 13 Jun 2007 06:53:25 +0200 (CEST) Subject: [Python-checkins] r55952 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070613045325.C60B41E4004@bag.python.org> Author: brett.cannon Date: Wed Jun 13 06:53:24 2007 New Revision: 55952 Modified: sandbox/trunk/import_in_py/pseudocode.py Log: Add pseudocode for how import looks for extension, Python source, and Python bytecode files. Modified: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- sandbox/trunk/import_in_py/pseudocode.py (original) +++ sandbox/trunk/import_in_py/pseudocode.py Wed Jun 13 06:53:24 2007 @@ -127,8 +127,40 @@ return module +from imp import get_suffixes, C_EXTENSION def find_extension_module(name, path_entry): - pass + """Try to locate a C extension module for the requested module.""" + # Get the immediate name of the module being searched for as the extension + # module's file name will be based on it. + immediate_name = name.rsplit('.', 1)[-1] + # Check every possible C extension suffix with the immediate module name + # (typically two; '.so' and 'module.so'). + for suffix in (suffix[0] for suffix in get_suffixes() + if suffix[2] == C_EXTENSION): + file_path = os.path.join(path_entry, immediate_name + suffix) + if os.path.isfile(file_path): # I/O + return extension_loader(name, file_path) + else: + return None + +from imp import PY_SOURCE, PY_COMPILED def find_py_pyc_module(name, path_entry): - pass + """Try to locate a Python source code or bytecode module for the requested + module.""" + # Get the immediate name of the module being imported as the Python file's + # name will be based on it. + immediate_name = name.rsplit('.', 1)[-1] + # Check every valid Python code suffix for possible files (typically two; + # '.py' and either '.pyc' or '.pyo'). + for suffix in (suffix[0] for suffix in get_suffixes() + if suffix[2] in (PY_SOURCE, PY_COMPILED)): + # See if the module is actually a package. + pkg_init_path = os.path.join(path_entry, immediate_name, + '__init__' + suffix) + if os.path.isfile(pkg_init_path): # I/O + return package_loader(name, pkg_init_path) + # If module is not a package, see if it is a file by itself. + file_path = os.path.join(path_entry, immediate_name + suffix) + if os.path.isfile(file_path): # I/O + return py_loader(name, file_path) From python-checkins at python.org Wed Jun 13 06:56:10 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 13 Jun 2007 06:56:10 +0200 (CEST) Subject: [Python-checkins] r55953 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070613045610.DF3A11E4005@bag.python.org> Author: brett.cannon Date: Wed Jun 13 06:56:08 2007 New Revision: 55953 Modified: sandbox/trunk/import_in_py/pseudocode.py Log: Add stub for loader of Python source and bytecode. Modified: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- sandbox/trunk/import_in_py/pseudocode.py (original) +++ sandbox/trunk/import_in_py/pseudocode.py Wed Jun 13 06:56:08 2007 @@ -1,7 +1,6 @@ raise ImportError("module is just pseudocode") import sys - def __import__(name, globals, locals, fromlist, level): """Pseudocode to explain how importing works. @@ -159,8 +158,12 @@ pkg_init_path = os.path.join(path_entry, immediate_name, '__init__' + suffix) if os.path.isfile(pkg_init_path): # I/O - return package_loader(name, pkg_init_path) + return py_loader(name, pkg_init_path, is_pkg=True) # If module is not a package, see if it is a file by itself. file_path = os.path.join(path_entry, immediate_name + suffix) if os.path.isfile(file_path): # I/O - return py_loader(name, file_path) + return py_loader(name, file_path, is_pkg=False) + + +def py_loader(name, file_path, is_pkg): + pass From python-checkins at python.org Wed Jun 13 07:53:19 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 13 Jun 2007 07:53:19 +0200 (CEST) Subject: [Python-checkins] r55955 - sandbox/trunk/import_in_py/pseudocode.py Message-ID: <20070613055319.52B931E4002@bag.python.org> Author: brett.cannon Date: Wed Jun 13 07:53:18 2007 New Revision: 55955 Modified: sandbox/trunk/import_in_py/pseudocode.py Log: Add support for __path__ searching. Modified: sandbox/trunk/import_in_py/pseudocode.py ============================================================================== --- sandbox/trunk/import_in_py/pseudocode.py (original) +++ sandbox/trunk/import_in_py/pseudocode.py Wed Jun 13 07:53:18 2007 @@ -25,10 +25,17 @@ # Since loaders are required to set the module in sys.modules, a successful # import should be followed by 'continue' to let the next module be # imported. - for parent in each_parent(name): + for name in each_parent(name): # If the module is already cached in sys.modules then move along. - if parent in sys.modules: + if name in sys.modules: continue + # Try to find a __path__ attribute on the (possibly non-existent) + # parent. + immediate_parent = name.rsplit('.', 1)[0] + try: + path = sys.modules[immediate_parent].__path__ + except (KeyError, AttributeError): + path = None # Search sys.meta_path. for meta_importer in sys.meta_path: loader = meta_importer.find_module(name, path) @@ -43,8 +50,9 @@ loader.load_module(name) continue # With sys.meta_path, built-ins, and frozen modules checked, now look - # at sys.path. - for path_entry in sys.path: + # at sys.path or parent.__path__. + search_path = path if path else sys.path + for path_entry in search_path # Look for a cached importer. if path_entry in sys.path_importer_cache: importer = sys.path_importer_cache[path_entry] From python-checkins at python.org Wed Jun 13 09:07:04 2007 From: python-checkins at python.org (thomas.heller) Date: Wed, 13 Jun 2007 09:07:04 +0200 (CEST) Subject: [Python-checkins] r55956 - python/trunk/Tools/buildbot/external-amd64.bat Message-ID: <20070613070704.3E5511E4002@bag.python.org> Author: thomas.heller Date: Wed Jun 13 09:07:03 2007 New Revision: 55956 Modified: python/trunk/Tools/buildbot/external-amd64.bat Log: Do not hardcode the buildbot's directory name. Modified: python/trunk/Tools/buildbot/external-amd64.bat ============================================================================== --- python/trunk/Tools/buildbot/external-amd64.bat (original) +++ python/trunk/Tools/buildbot/external-amd64.bat Wed Jun 13 09:07:03 2007 @@ -7,19 +7,20 @@ call "%MSSdk%\SetEnv" /XP64 /RETAIL @rem Assume we start inside the Python source directory +for %%i in (.) do set CWD=%%~fi cd .. @rem sqlite if not exist sqlite-source-3.3.4 ( svn export http://svn.python.org/projects/external/sqlite-source-3.3.4 - if exist build\PCbuild\sqlite3.dll del build\PCbuild\sqlite3.dll + if exist %CWD%\PCbuild\sqlite3.dll del %CWD%\PCbuild\sqlite3.dll ) -if not exist build\PCbuild\sqlite3.dll ( +if not exist %CWD%\PCbuild\sqlite3.dll ( cd sqlite-source-3.3.4\amd64 cl ..\*.c link /def:..\sqlite3.def /dll *.obj /out:sqlite3.dll bufferoverflowU.lib cd ..\.. - copy sqlite-source-3.3.4\amd64\sqlite3.dll build\PCbuild + copy sqlite-source-3.3.4\amd64\sqlite3.dll %CWD%\PCbuild ) @rem bzip From python-checkins at python.org Wed Jun 13 09:07:41 2007 From: python-checkins at python.org (thomas.heller) Date: Wed, 13 Jun 2007 09:07:41 +0200 (CEST) Subject: [Python-checkins] r55957 - python/trunk/Tools/buildbot/README.tcltk-AMD64 Message-ID: <20070613070741.92B4C1E4002@bag.python.org> Author: thomas.heller Date: Wed Jun 13 09:07:41 2007 New Revision: 55957 Added: python/trunk/Tools/buildbot/README.tcltk-AMD64 (contents, props changed) Log: Notes about building tcl/tk for windows/AMD64. Added: python/trunk/Tools/buildbot/README.tcltk-AMD64 ============================================================================== --- (empty file) +++ python/trunk/Tools/buildbot/README.tcltk-AMD64 Wed Jun 13 09:07:41 2007 @@ -0,0 +1,36 @@ +Comments on building tcl/tk for AMD64 with the MS SDK compiler +============================================================== + +I did have to build tcl/tk manually. + +First, I had to build the nmakehlp.exe helper utility manually by executing + cl nmakehlp.c /link bufferoverflowU.lib +in both the tcl8.4.12\win and tk8.4.12\win directories. + +Second, the AMD64 compiler refuses to compile the file +tcl8.4.12\generic\tclExecute.c because it insists on using intrinsics +for the 'ceil' and 'floor' functions: + + ..\generic\tclExecute.c(394) : error C2099: initializer is not a constant + ..\generic\tclExecute.c(398) : error C2099: initializer is not a constant + +I did comment out these lines; an alternative would have been to use +the /Oi- compiler flag to disable the intrinsic functions. +The commands then used were these: + + svn export http://svn.python.org/projects/external/tcl8.4.12 + cd tcl8.4.12\win + REM + echo patch the tcl8.4.12\generic\tclExecute.c file + pause + REM + cl nmakehlp.c /link bufferoverflowU.lib + nmake -f makefile.vc MACHINE=AMD64 + nmake -f makefile.vc INSTALLDIR=..\..\tcltk install + cd ..\.. + svn export http://svn.python.org/projects/external/tk8.4.12 + cd tk8.4.12\win + cl nmakehlp.c /link bufferoverflowU.lib + nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 MACHINE=AMD64 + nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install + cd ..\.. From python-checkins at python.org Wed Jun 13 09:55:01 2007 From: python-checkins at python.org (thomas.heller) Date: Wed, 13 Jun 2007 09:55:01 +0200 (CEST) Subject: [Python-checkins] r55958 - python/trunk/Tools/buildbot/external-amd64.bat Message-ID: <20070613075501.32A161E4002@bag.python.org> Author: thomas.heller Date: Wed Jun 13 09:54:57 2007 New Revision: 55958 Modified: python/trunk/Tools/buildbot/external-amd64.bat Log: Build bzip2. Modified: python/trunk/Tools/buildbot/external-amd64.bat ============================================================================== --- python/trunk/Tools/buildbot/external-amd64.bat (original) +++ python/trunk/Tools/buildbot/external-amd64.bat Wed Jun 13 09:54:57 2007 @@ -25,6 +25,11 @@ @rem bzip if not exist bzip2-1.0.3 svn export http://svn.python.org/projects/external/bzip2-1.0.3 +if not exist bzip2-1.0.3\libbz2.lib ( + cd bzip2-1.0.3 + nmake /f makefile.msc CFLAGS="-DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologo /GS-" + cd .. +) @rem Sleepycat db if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20 From nnorwitz at gmail.com Wed Jun 13 11:18:10 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 13 Jun 2007 05:18:10 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070613091810.GA31115@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From theller at ctypes.org Wed Jun 13 11:16:04 2007 From: theller at ctypes.org (Thomas Heller) Date: Wed, 13 Jun 2007 11:16:04 +0200 Subject: [Python-checkins] r55948 - python/trunk/Include/pyport.h In-Reply-To: <20070613034222.7C2D31E4002@bag.python.org> References: <20070613034222.7C2D31E4002@bag.python.org> Message-ID: martin.v.loewis schrieb: > Author: martin.v.loewis > Date: Wed Jun 13 05:42:19 2007 > New Revision: 55948 > > Modified: > python/trunk/Include/pyport.h > Log: > Provide PY_LLONG_MAX on all systems having long long. > Will backport to 2.5. > > > Modified: python/trunk/Include/pyport.h > ============================================================================== > --- python/trunk/Include/pyport.h (original) > +++ python/trunk/Include/pyport.h Wed Jun 13 05:42:19 2007 > @@ -62,14 +62,20 @@ > #ifndef PY_LONG_LONG > #define PY_LONG_LONG long long > #if defined(LLONG_MAX) > +/* If LLONG_MAX is defined in limits.h, use that. */ > #define PY_LLONG_MIN LLONG_MIN > #define PY_LLONG_MAX LLONG_MAX > #define PY_ULLONG_MAX ULLONG_MAX > -#elif defined(__s390__) > -/* Apparently, S390 Linux has long long, but no LLONG_MAX */ > -#define PY_LLONG_MAX 9223372036854775807LL > +#elif defined(__LONG_LONG_MAX__) > +/* Otherwise, if GCC has a builtin define, use that. */ > +#define PY_LLONG_MAX __LONG_LONG_MAX__ > +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) > +#define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL) > +#else > +/* Otherwise, rely on two's complement. */ > +#define PY_ULLONG_MAX (~0ULL) > +#define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) > #define PY_LLONG_MIN (-PY_LLONG_MAX-1) > -#define PY_ULLONG_MAX 18446744073709551615ULL > #endif /* LLONG_MAX */ > #endif > #endif /* HAVE_LONG_LONG */ Building _testcapi on windows/AMD64 still fails with this error: Compiling... cl : Command line warning D9002 : ignoring unknown option '/YXstdafx.h' _testcapimodule.c \buildbot\trunk.heller-windows-amd64\build\Modules\_testcapimodule.c(913) : error C2065: 'LLONG_MAX' : undeclared identifier \buildbot\trunk.heller-windows-amd64\build\Modules\_testcapimodule.c(914) : error C2065: 'LLONG_MIN' : undeclared identifier \buildbot\trunk.heller-windows-amd64\build\Modules\_testcapimodule.c(915) : error C2065: 'ULLONG_MAX' : undeclared identifier This is the remaining failure in the compile step. It would be great if anyone knows how to fix this; I'm running out of time. Thomas From buildbot at python.org Wed Jun 13 14:11:39 2007 From: buildbot at python.org (buildbot at python.org) Date: Wed, 13 Jun 2007 12:11:39 +0000 Subject: [Python-checkins] buildbot warnings in alpha Debian trunk Message-ID: <20070613121139.AE7501E4002@bag.python.org> The Buildbot has detected a new failure of alpha Debian trunk. Full details are available at: http://www.python.org/dev/buildbot/all/alpha%2520Debian%2520trunk/builds/26 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: thomas.heller Build had warnings: warnings test Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Wed Jun 13 18:57:16 2007 From: python-checkins at python.org (walter.doerwald) Date: Wed, 13 Jun 2007 18:57:16 +0200 (CEST) Subject: [Python-checkins] r55962 - in python/trunk: Include/pyerrors.h Include/structmember.h Misc/NEWS Objects/exceptions.c Python/structmember.c Message-ID: <20070613165716.323A21E4002@bag.python.org> Author: walter.doerwald Date: Wed Jun 13 18:57:12 2007 New Revision: 55962 Modified: python/trunk/Include/pyerrors.h python/trunk/Include/structmember.h python/trunk/Misc/NEWS python/trunk/Objects/exceptions.c python/trunk/Python/structmember.c Log: Add T_PYSSIZET in structmember.h: This can be used for Py_ssize_t members. Simplify the implementation of UnicodeError objects: start and end attributes are now stored directly as Py_ssize_t members, which simplifies various get and set functions. Modified: python/trunk/Include/pyerrors.h ============================================================================== --- python/trunk/Include/pyerrors.h (original) +++ python/trunk/Include/pyerrors.h Wed Jun 13 18:57:12 2007 @@ -34,8 +34,8 @@ PyObject *message; PyObject *encoding; PyObject *object; - PyObject *start; - PyObject *end; + Py_ssize_t start; + Py_ssize_t end; PyObject *reason; } PyUnicodeErrorObject; #endif Modified: python/trunk/Include/structmember.h ============================================================================== --- python/trunk/Include/structmember.h (original) +++ python/trunk/Include/structmember.h Wed Jun 13 18:57:12 2007 @@ -68,6 +68,7 @@ #ifdef HAVE_LONG_LONG #define T_LONGLONG 17 #define T_ULONGLONG 18 +#define T_PYSSIZET 19 /* Py_ssize_t */ #endif /* HAVE_LONG_LONG */ /* Flags */ Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Wed Jun 13 18:57:12 2007 @@ -14,6 +14,8 @@ - Patch #1733960: Allow T_LONGLONG to accept ints. +- T_PYSSIZET can now be used in PyMemberDef lists for Py_ssize_t members. + - Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. @@ -687,6 +689,9 @@ - Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the first chunk fed to the decoder started with a BOM, but was longer than 3 bytes. +- The implementation of UnicodeError objects has been simplified (start and end + attributes are now stored directly as Py_ssize_t members). + Extension Modules ----------------- Modified: python/trunk/Objects/exceptions.c ============================================================================== --- python/trunk/Objects/exceptions.c (original) +++ python/trunk/Objects/exceptions.c Wed Jun 13 18:57:12 2007 @@ -1238,38 +1238,6 @@ "Unicode related error."); #ifdef Py_USING_UNICODE -static int -get_int(PyObject *attr, Py_ssize_t *value, const char *name) -{ - if (!attr) { - PyErr_Format(PyExc_TypeError, "%.200s attribute not set", name); - return -1; - } - - if (PyInt_Check(attr)) { - *value = PyInt_AS_LONG(attr); - } else if (PyLong_Check(attr)) { - *value = _PyLong_AsSsize_t(attr); - if (*value == -1 && PyErr_Occurred()) - return -1; - } else { - PyErr_Format(PyExc_TypeError, "%.200s attribute must be int", name); - return -1; - } - return 0; -} - -static int -set_ssize_t(PyObject **attr, Py_ssize_t value) -{ - PyObject *obj = PyInt_FromSsize_t(value); - if (!obj) - return -1; - Py_CLEAR(*attr); - *attr = obj; - return 0; -} - static PyObject * get_string(PyObject *attr, const char *name) { @@ -1349,40 +1317,38 @@ int PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start) { - if (!get_int(((PyUnicodeErrorObject *)exc)->start, start, "start")) { - Py_ssize_t size; - PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object, - "object"); - if (!obj) return -1; - size = PyUnicode_GET_SIZE(obj); - if (*start<0) - *start = 0; /*XXX check for values <0*/ - if (*start>=size) - *start = size-1; - Py_DECREF(obj); - return 0; - } - return -1; + Py_ssize_t size; + PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object, + "object"); + if (!obj) + return -1; + *start = ((PyUnicodeErrorObject *)exc)->start; + size = PyUnicode_GET_SIZE(obj); + if (*start<0) + *start = 0; /*XXX check for values <0*/ + if (*start>=size) + *start = size-1; + Py_DECREF(obj); + return 0; } int PyUnicodeDecodeError_GetStart(PyObject *exc, Py_ssize_t *start) { - if (!get_int(((PyUnicodeErrorObject *)exc)->start, start, "start")) { - Py_ssize_t size; - PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object, - "object"); - if (!obj) return -1; - size = PyString_GET_SIZE(obj); - if (*start<0) - *start = 0; - if (*start>=size) - *start = size-1; - Py_DECREF(obj); - return 0; - } - return -1; + Py_ssize_t size; + PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object, + "object"); + if (!obj) + return -1; + size = PyString_GET_SIZE(obj); + *start = ((PyUnicodeErrorObject *)exc)->start; + if (*start<0) + *start = 0; + if (*start>=size) + *start = size-1; + Py_DECREF(obj); + return 0; } @@ -1396,61 +1362,62 @@ int PyUnicodeEncodeError_SetStart(PyObject *exc, Py_ssize_t start) { - return set_ssize_t(&((PyUnicodeErrorObject *)exc)->start, start); + ((PyUnicodeErrorObject *)exc)->start = start; + return 0; } int PyUnicodeDecodeError_SetStart(PyObject *exc, Py_ssize_t start) { - return set_ssize_t(&((PyUnicodeErrorObject *)exc)->start, start); + ((PyUnicodeErrorObject *)exc)->start = start; + return 0; } int PyUnicodeTranslateError_SetStart(PyObject *exc, Py_ssize_t start) { - return set_ssize_t(&((PyUnicodeErrorObject *)exc)->start, start); + ((PyUnicodeErrorObject *)exc)->start = start; + return 0; } int PyUnicodeEncodeError_GetEnd(PyObject *exc, Py_ssize_t *end) { - if (!get_int(((PyUnicodeErrorObject *)exc)->end, end, "end")) { - Py_ssize_t size; - PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object, - "object"); - if (!obj) return -1; - size = PyUnicode_GET_SIZE(obj); - if (*end<1) - *end = 1; - if (*end>size) - *end = size; - Py_DECREF(obj); - return 0; - } - return -1; + Py_ssize_t size; + PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)->object, + "object"); + if (!obj) + return -1; + *end = ((PyUnicodeErrorObject *)exc)->end; + size = PyUnicode_GET_SIZE(obj); + if (*end<1) + *end = 1; + if (*end>size) + *end = size; + Py_DECREF(obj); + return 0; } int PyUnicodeDecodeError_GetEnd(PyObject *exc, Py_ssize_t *end) { - if (!get_int(((PyUnicodeErrorObject *)exc)->end, end, "end")) { - Py_ssize_t size; - PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object, - "object"); - if (!obj) return -1; - size = PyString_GET_SIZE(obj); - if (*end<1) - *end = 1; - if (*end>size) - *end = size; - Py_DECREF(obj); - return 0; - } - return -1; + Py_ssize_t size; + PyObject *obj = get_string(((PyUnicodeErrorObject *)exc)->object, + "object"); + if (!obj) + return -1; + *end = ((PyUnicodeErrorObject *)exc)->end; + size = PyString_GET_SIZE(obj); + if (*end<1) + *end = 1; + if (*end>size) + *end = size; + Py_DECREF(obj); + return 0; } @@ -1464,21 +1431,24 @@ int PyUnicodeEncodeError_SetEnd(PyObject *exc, Py_ssize_t end) { - return set_ssize_t(&((PyUnicodeErrorObject *)exc)->end, end); + ((PyUnicodeErrorObject *)exc)->end = end; + return 0; } int PyUnicodeDecodeError_SetEnd(PyObject *exc, Py_ssize_t end) { - return set_ssize_t(&((PyUnicodeErrorObject *)exc)->end, end); + ((PyUnicodeErrorObject *)exc)->end = end; + return 0; } int PyUnicodeTranslateError_SetEnd(PyObject *exc, Py_ssize_t end) { - return set_ssize_t(&((PyUnicodeErrorObject *)exc)->end, end); + ((PyUnicodeErrorObject *)exc)->end = end; + return 0; } PyObject * @@ -1529,25 +1499,20 @@ { Py_CLEAR(self->encoding); Py_CLEAR(self->object); - Py_CLEAR(self->start); - Py_CLEAR(self->end); Py_CLEAR(self->reason); - if (!PyArg_ParseTuple(args, "O!O!O!O!O!", + if (!PyArg_ParseTuple(args, "O!O!nnO!", &PyString_Type, &self->encoding, objecttype, &self->object, - &PyInt_Type, &self->start, - &PyInt_Type, &self->end, + &self->start, + &self->end, &PyString_Type, &self->reason)) { - self->encoding = self->object = self->start = self->end = - self->reason = NULL; + self->encoding = self->object = self->reason = NULL; return -1; } Py_INCREF(self->encoding); Py_INCREF(self->object); - Py_INCREF(self->start); - Py_INCREF(self->end); Py_INCREF(self->reason); return 0; @@ -1558,8 +1523,6 @@ { Py_CLEAR(self->encoding); Py_CLEAR(self->object); - Py_CLEAR(self->start); - Py_CLEAR(self->end); Py_CLEAR(self->reason); return BaseException_clear((PyBaseExceptionObject *)self); } @@ -1577,8 +1540,6 @@ { Py_VISIT(self->encoding); Py_VISIT(self->object); - Py_VISIT(self->start); - Py_VISIT(self->end); Py_VISIT(self->reason); return BaseException_traverse((PyBaseExceptionObject *)self, visit, arg); } @@ -1588,9 +1549,9 @@ PyDoc_STR("exception encoding")}, {"object", T_OBJECT, offsetof(PyUnicodeErrorObject, object), 0, PyDoc_STR("exception object")}, - {"start", T_OBJECT, offsetof(PyUnicodeErrorObject, start), 0, + {"start", T_PYSSIZET, offsetof(PyUnicodeErrorObject, start), 0, PyDoc_STR("exception start")}, - {"end", T_OBJECT, offsetof(PyUnicodeErrorObject, end), 0, + {"end", T_PYSSIZET, offsetof(PyUnicodeErrorObject, end), 0, PyDoc_STR("exception end")}, {"reason", T_OBJECT, offsetof(PyUnicodeErrorObject, reason), 0, PyDoc_STR("exception reason")}, @@ -1614,17 +1575,10 @@ static PyObject * UnicodeEncodeError_str(PyObject *self) { - Py_ssize_t start; - Py_ssize_t end; - - if (PyUnicodeEncodeError_GetStart(self, &start)) - return NULL; - - if (PyUnicodeEncodeError_GetEnd(self, &end)) - return NULL; + PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self; - if (end==start+1) { - int badchar = (int)PyUnicode_AS_UNICODE(((PyUnicodeErrorObject *)self)->object)[start]; + if (uself->end==uself->start+1) { + int badchar = (int)PyUnicode_AS_UNICODE(uself->object)[uself->start]; char badchar_str[20]; if (badchar <= 0xff) PyOS_snprintf(badchar_str, sizeof(badchar_str), "x%02x", badchar); @@ -1634,18 +1588,18 @@ PyOS_snprintf(badchar_str, sizeof(badchar_str), "U%08x", badchar); return PyString_FromFormat( "'%.400s' codec can't encode character u'\\%s' in position %zd: %.400s", - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding), + PyString_AS_STRING(uself->encoding), badchar_str, - start, - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason) + uself->start, + PyString_AS_STRING(uself->reason) ); } return PyString_FromFormat( "'%.400s' codec can't encode characters in position %zd-%zd: %.400s", - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding), - start, - (end-1), - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason) + PyString_AS_STRING(uself->encoding), + uself->start, + uself->end-1, + PyString_AS_STRING(uself->reason) ); } @@ -1690,34 +1644,27 @@ static PyObject * UnicodeDecodeError_str(PyObject *self) { - Py_ssize_t start = 0; - Py_ssize_t end = 0; + PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self; - if (PyUnicodeDecodeError_GetStart(self, &start)) - return NULL; - - if (PyUnicodeDecodeError_GetEnd(self, &end)) - return NULL; - - if (end==start+1) { + if (uself->end==uself->start+1) { /* FromFormat does not support %02x, so format that separately */ char byte[4]; PyOS_snprintf(byte, sizeof(byte), "%02x", - ((int)PyString_AS_STRING(((PyUnicodeErrorObject *)self)->object)[start])&0xff); + ((int)PyString_AS_STRING(uself->object)[uself->start])&0xff); return PyString_FromFormat( "'%.400s' codec can't decode byte 0x%s in position %zd: %.400s", - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding), + PyString_AS_STRING(uself->encoding), byte, - start, - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason) + uself->start, + PyString_AS_STRING(uself->reason) ); } return PyString_FromFormat( "'%.400s' codec can't decode bytes in position %zd-%zd: %.400s", - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->encoding), - start, - (end-1), - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason) + PyString_AS_STRING(uself->encoding), + uself->start, + uself->end-1, + PyString_AS_STRING(uself->reason) ); } @@ -1761,22 +1708,18 @@ return -1; Py_CLEAR(self->object); - Py_CLEAR(self->start); - Py_CLEAR(self->end); Py_CLEAR(self->reason); - if (!PyArg_ParseTuple(args, "O!O!O!O!", + if (!PyArg_ParseTuple(args, "O!nnO!", &PyUnicode_Type, &self->object, - &PyInt_Type, &self->start, - &PyInt_Type, &self->end, + &self->start, + &self->end, &PyString_Type, &self->reason)) { - self->object = self->start = self->end = self->reason = NULL; + self->object = self->reason = NULL; return -1; } Py_INCREF(self->object); - Py_INCREF(self->start); - Py_INCREF(self->end); Py_INCREF(self->reason); return 0; @@ -1786,17 +1729,10 @@ static PyObject * UnicodeTranslateError_str(PyObject *self) { - Py_ssize_t start; - Py_ssize_t end; - - if (PyUnicodeTranslateError_GetStart(self, &start)) - return NULL; - - if (PyUnicodeTranslateError_GetEnd(self, &end)) - return NULL; + PyUnicodeErrorObject *uself = (PyUnicodeErrorObject *)self; - if (end==start+1) { - int badchar = (int)PyUnicode_AS_UNICODE(((PyUnicodeErrorObject *)self)->object)[start]; + if (uself->end==uself->start+1) { + int badchar = (int)PyUnicode_AS_UNICODE(uself->object)[uself->start]; char badchar_str[20]; if (badchar <= 0xff) PyOS_snprintf(badchar_str, sizeof(badchar_str), "x%02x", badchar); @@ -1807,15 +1743,15 @@ return PyString_FromFormat( "can't translate character u'\\%s' in position %zd: %.400s", badchar_str, - start, - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason) + uself->start, + PyString_AS_STRING(uself->reason) ); } return PyString_FromFormat( "can't translate characters in position %zd-%zd: %.400s", - start, - (end-1), - PyString_AS_STRING(((PyUnicodeErrorObject *)self)->reason) + uself->start, + uself->end-1, + PyString_AS_STRING(uself->reason) ); } Modified: python/trunk/Python/structmember.c ============================================================================== --- python/trunk/Python/structmember.c (original) +++ python/trunk/Python/structmember.c Wed Jun 13 18:57:12 2007 @@ -85,6 +85,9 @@ case T_ULONG: v = PyLong_FromUnsignedLong(*(unsigned long*)addr); break; + case T_PYSSIZET: + v = PyInt_FromSsize_t(*(Py_ssize_t*)addr); + break; case T_FLOAT: v = PyFloat_FromDouble((double)*(float*)addr); break; @@ -263,6 +266,13 @@ } break; } + case T_PYSSIZET:{ + *(Py_ssize_t*)addr = PyInt_AsSsize_t(v); + if ((*(Py_ssize_t*)addr == (Py_ssize_t)-1) + && PyErr_Occurred()) + return -1; + break; + } case T_FLOAT:{ double double_val; double_val = PyFloat_AsDouble(v); From buildbot at python.org Wed Jun 13 19:24:35 2007 From: buildbot at python.org (buildbot at python.org) Date: Wed, 13 Jun 2007 17:24:35 +0000 Subject: [Python-checkins] buildbot warnings in amd64 gentoo trunk Message-ID: <20070613172435.6D7AA1E4002@bag.python.org> The Buildbot has detected a new failure of amd64 gentoo trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520gentoo%2520trunk/builds/2123 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: walter.doerwald Build had warnings: warnings test Excerpt from the test logfile: Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_socketserver.py", line 93, in run svr.serve_a_few() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/test/test_socketserver.py", line 35, in serve_a_few self.handle_request() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 224, in handle_request self.handle_error(request, client_address) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 429, in process_request self.collect_children() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/SocketServer.py", line 425, in collect_children self.active_children.remove(pid) ValueError: list.remove(x): x not in list Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') Traceback (most recent call last): File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 465, in __bootstrap self.run() File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/home/buildbot/slave/py-build/trunk.norwitz-amd64/build/Lib/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') 1 test failed: test_socketserver make: *** [buildbottest] Error 1 sincerely, -The Buildbot From nnorwitz at gmail.com Wed Jun 13 23:09:09 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 13 Jun 2007 17:09:09 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070613210909.GA16860@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From nnorwitz at gmail.com Thu Jun 14 11:08:29 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 14 Jun 2007 05:08:29 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070614090829.GA23698@python.psfb.org> test_popen2 leaked [-26, 0, 0] references, sum=-26 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Thu Jun 14 21:07:57 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Thu, 14 Jun 2007 21:07:57 +0200 (CEST) Subject: [Python-checkins] r55972 - in python/branches/cpy_merge: Doc/api/exceptions.tex Doc/lib/libctypes.tex Doc/lib/libdecimal.tex Doc/lib/libexcs.tex Doc/lib/libftplib.tex Doc/lib/libfuncs.tex Doc/lib/libhttplib.tex Doc/lib/libpoplib.tex Doc/lib/libsmtplib.tex Doc/lib/libsocket.tex Doc/lib/libtelnetlib.tex Doc/lib/libthreading.tex Doc/lib/liburllib2.tex Doc/ref/ref2.tex Doc/ref/ref3.tex Doc/tut/tut.tex Doc/whatsnew/whatsnew26.tex Include/abstract.h Include/longobject.h Include/object.h Include/pyerrors.h Include/pyport.h Lib/CGIHTTPServer.py Lib/_strptime.py Lib/anydbm.py Lib/bsddb/__init__.py Lib/bsddb/dbshelve.py Lib/bsddb/dbtables.py Lib/bsddb/test/test_1413192.py Lib/bsddb/test/test_basics.py Lib/bsddb/test/test_env_close.py Lib/bsddb/test/test_sequence.py Lib/cgitb.py Lib/collections.py Lib/copy.py Lib/ctypes/__init__.py Lib/ctypes/_endian.py Lib/ctypes/test/test_init.py Lib/ctypes/test/test_numbers.py Lib/dbhash.py Lib/dis.py Lib/distutils/ccompiler.py Lib/distutils/cmd.py Lib/distutils/command/build_py.py Lib/distutils/command/build_scripts.py Lib/distutils/command/install_scripts.py Lib/distutils/command/register.py Lib/distutils/dir_util.py Lib/distutils/dist.py Lib/distutils/extension.py Lib/distutils/mwerkscompiler.py Lib/distutils/tests/support.py Lib/distutils/tests/test_build_py.py Lib/distutils/text_file.py Lib/distutils/unixccompiler.py Lib/dumbdbm.py Lib/encodings/uu_codec.py Lib/ftplib.py Lib/idlelib/CallTips.py Lib/idlelib/ObjectBrowser.py Lib/idlelib/rpc.py Lib/imputil.py Lib/inspect.py Lib/lib-tk/ScrolledText.py Lib/lib-tk/Tkinter.py Lib/logging/__init__.py Lib/logging/config.py Lib/logging/handlers.py Lib/mailbox.py Lib/mhlib.py Lib/new.py Lib/optparse.py Lib/os.py Lib/pickle.py Lib/pickletools.py Lib/plat-atheos/IN.py Lib/plat-mac/aepack.py Lib/plat-mac/aetypes.py Lib/plat-mac/bundlebuilder.py Lib/plat-mac/gensuitemodule.py Lib/plat-mac/macostools.py Lib/plat-mac/plistlib.py Lib/plat-sunos5/IN.py Lib/plat-sunos5/STROPTS.py Lib/plat-unixware7/IN.py Lib/plat-unixware7/STROPTS.py Lib/platform.py Lib/pty.py Lib/pydoc.py Lib/random.py Lib/repr.py Lib/sqlite3/test/dbapi.py Lib/sre_parse.py Lib/stat.py Lib/string.py Lib/subprocess.py Lib/tarfile.py Lib/tempfile.py Lib/test/exception_hierarchy.txt Lib/test/list_tests.py Lib/test/output/test_class Lib/test/output/test_tokenize Lib/test/regrtest.py Lib/test/string_tests.py Lib/test/test_array.py Lib/test/test_builtin.py Lib/test/test_bytes.py Lib/test/test_cgi.py Lib/test/test_class.py Lib/test/test_collections.py Lib/test/test_compile.py Lib/test/test_descr.py Lib/test/test_dumbdbm.py Lib/test/test_format.py Lib/test/test_grammar.py Lib/test/test_hexoct.py Lib/test/test_isinstance.py Lib/test/test_list.py Lib/test/test_logging.py Lib/test/test_long.py Lib/test/test_multibytecodec.py Lib/test/test_optparse.py Lib/test/test_peepholer.py Lib/test/test_pep352.py Lib/test/test_pyclbr.py Lib/test/test_repr.py Lib/test/test_str.py Lib/test/test_strptime.py Lib/test/test_structmembers.py Lib/test/test_subprocess.py Lib/test/test_sundry.py Lib/test/test_tarfile.py Lib/test/test_tempfile.py Lib/test/test_threading.py Lib/test/test_tuple.py Lib/test/test_unicode.py Lib/test/test_unicode_file.py Lib/test/test_unittest.py Lib/test/test_urllib2.py Lib/test/test_urllib2net.py Lib/test/test_userlist.py Lib/test/test_uu.py Lib/test/test_weakref.py Lib/test/test_xmlrpc.py Lib/test/test_zipimport.py Lib/test/tf_inherit_check.py Lib/test/tokenize_tests.txt Lib/threading.py Lib/tokenize.py Lib/types.py Lib/unittest.py Lib/urllib2.py Lib/uu.py Lib/warnings.py Lib/weakref.py Lib/wsgiref/headers.py Lib/wsgiref/validate.py Lib/xml/dom/domreg.py Lib/xml/sax/saxutils.py Lib/xmlrpclib.py Misc/ACKS Misc/NEWS Misc/Vim/python.vim Misc/build.sh Misc/cheatsheet Misc/python-mode.el Misc/valgrind-python.supp Modules/_bsddb.c Modules/_ctypes/_ctypes.c Modules/_ctypes/callbacks.c Modules/_ctypes/callproc.c Modules/_ctypes/cfield.c Modules/_ctypes/ctypes.h Modules/_ctypes/libffi/src/x86/ffi.c Modules/_ctypes/libffi/src/x86/ffi64.c Modules/_ctypes/stgdict.c Modules/_sqlite/cache.c Modules/_sqlite/module.c Modules/_testcapimodule.c Modules/cjkcodecs/multibytecodec.c Modules/getbuildinfo.c Modules/socketmodule.c Objects/abstract.c Objects/bufferobject.c Objects/exceptions.c Objects/intobject.c Objects/longobject.c Objects/stringobject.c Objects/typeobject.c Objects/unicodeobject.c PC/os2emx/python25.def PC/os2vacpp/python.def PC/pyconfig.h PCbuild/_bsddb.vcproj PCbuild/_ssl.mak PCbuild/build_ssl.bat PCbuild/build_ssl.py PCbuild/pcbuild.sln Parser/tokenizer.c Python/ast.c Python/bltinmodule.c Python/compile.c Python/mystrtoul.c Python/peephole.c Python/structmember.c Python/symtable.c README Tools/i18n/msgfmt.py Tools/pybench/Arithmetic.py Tools/pybench/CommandLine.py Tools/pybench/Numbers.py Tools/pybench/systimes.py Tools/scripts/classfix.py Tools/scripts/fixcid.py Tools/scripts/ftpmirror.py Tools/scripts/linktree.py Tools/scripts/methfix.py Tools/scripts/pathfix.py Tools/scripts/reindent.py Tools/scripts/which.py Tools/unicode/makeunicodedata.py Tools/versioncheck/pyversioncheck.py Tools/webchecker/websucker.py configure configure.in setup.py Message-ID: <20070614190757.63FF31E4003@bag.python.org> Author: alexandre.vassalotti Date: Thu Jun 14 21:06:29 2007 New Revision: 55972 Modified: python/branches/cpy_merge/Doc/api/exceptions.tex python/branches/cpy_merge/Doc/lib/libctypes.tex python/branches/cpy_merge/Doc/lib/libdecimal.tex python/branches/cpy_merge/Doc/lib/libexcs.tex python/branches/cpy_merge/Doc/lib/libftplib.tex python/branches/cpy_merge/Doc/lib/libfuncs.tex python/branches/cpy_merge/Doc/lib/libhttplib.tex python/branches/cpy_merge/Doc/lib/libpoplib.tex python/branches/cpy_merge/Doc/lib/libsmtplib.tex python/branches/cpy_merge/Doc/lib/libsocket.tex python/branches/cpy_merge/Doc/lib/libtelnetlib.tex python/branches/cpy_merge/Doc/lib/libthreading.tex python/branches/cpy_merge/Doc/lib/liburllib2.tex python/branches/cpy_merge/Doc/ref/ref2.tex python/branches/cpy_merge/Doc/ref/ref3.tex python/branches/cpy_merge/Doc/tut/tut.tex python/branches/cpy_merge/Doc/whatsnew/whatsnew26.tex python/branches/cpy_merge/Include/abstract.h python/branches/cpy_merge/Include/longobject.h python/branches/cpy_merge/Include/object.h python/branches/cpy_merge/Include/pyerrors.h python/branches/cpy_merge/Include/pyport.h python/branches/cpy_merge/Lib/CGIHTTPServer.py python/branches/cpy_merge/Lib/_strptime.py python/branches/cpy_merge/Lib/anydbm.py python/branches/cpy_merge/Lib/bsddb/__init__.py python/branches/cpy_merge/Lib/bsddb/dbshelve.py python/branches/cpy_merge/Lib/bsddb/dbtables.py python/branches/cpy_merge/Lib/bsddb/test/test_1413192.py python/branches/cpy_merge/Lib/bsddb/test/test_basics.py python/branches/cpy_merge/Lib/bsddb/test/test_env_close.py python/branches/cpy_merge/Lib/bsddb/test/test_sequence.py python/branches/cpy_merge/Lib/cgitb.py python/branches/cpy_merge/Lib/collections.py python/branches/cpy_merge/Lib/copy.py python/branches/cpy_merge/Lib/ctypes/__init__.py python/branches/cpy_merge/Lib/ctypes/_endian.py python/branches/cpy_merge/Lib/ctypes/test/test_init.py python/branches/cpy_merge/Lib/ctypes/test/test_numbers.py python/branches/cpy_merge/Lib/dbhash.py python/branches/cpy_merge/Lib/dis.py python/branches/cpy_merge/Lib/distutils/ccompiler.py python/branches/cpy_merge/Lib/distutils/cmd.py python/branches/cpy_merge/Lib/distutils/command/build_py.py python/branches/cpy_merge/Lib/distutils/command/build_scripts.py python/branches/cpy_merge/Lib/distutils/command/install_scripts.py python/branches/cpy_merge/Lib/distutils/command/register.py python/branches/cpy_merge/Lib/distutils/dir_util.py python/branches/cpy_merge/Lib/distutils/dist.py python/branches/cpy_merge/Lib/distutils/extension.py python/branches/cpy_merge/Lib/distutils/mwerkscompiler.py python/branches/cpy_merge/Lib/distutils/tests/support.py python/branches/cpy_merge/Lib/distutils/tests/test_build_py.py python/branches/cpy_merge/Lib/distutils/text_file.py python/branches/cpy_merge/Lib/distutils/unixccompiler.py python/branches/cpy_merge/Lib/dumbdbm.py python/branches/cpy_merge/Lib/encodings/uu_codec.py python/branches/cpy_merge/Lib/ftplib.py python/branches/cpy_merge/Lib/idlelib/CallTips.py python/branches/cpy_merge/Lib/idlelib/ObjectBrowser.py python/branches/cpy_merge/Lib/idlelib/rpc.py python/branches/cpy_merge/Lib/imputil.py python/branches/cpy_merge/Lib/inspect.py python/branches/cpy_merge/Lib/lib-tk/ScrolledText.py python/branches/cpy_merge/Lib/lib-tk/Tkinter.py python/branches/cpy_merge/Lib/logging/__init__.py python/branches/cpy_merge/Lib/logging/config.py python/branches/cpy_merge/Lib/logging/handlers.py python/branches/cpy_merge/Lib/mailbox.py python/branches/cpy_merge/Lib/mhlib.py python/branches/cpy_merge/Lib/new.py python/branches/cpy_merge/Lib/optparse.py python/branches/cpy_merge/Lib/os.py python/branches/cpy_merge/Lib/pickle.py python/branches/cpy_merge/Lib/pickletools.py python/branches/cpy_merge/Lib/plat-atheos/IN.py python/branches/cpy_merge/Lib/plat-mac/aepack.py python/branches/cpy_merge/Lib/plat-mac/aetypes.py python/branches/cpy_merge/Lib/plat-mac/bundlebuilder.py python/branches/cpy_merge/Lib/plat-mac/gensuitemodule.py python/branches/cpy_merge/Lib/plat-mac/macostools.py python/branches/cpy_merge/Lib/plat-mac/plistlib.py python/branches/cpy_merge/Lib/plat-sunos5/IN.py python/branches/cpy_merge/Lib/plat-sunos5/STROPTS.py python/branches/cpy_merge/Lib/plat-unixware7/IN.py python/branches/cpy_merge/Lib/plat-unixware7/STROPTS.py python/branches/cpy_merge/Lib/platform.py python/branches/cpy_merge/Lib/pty.py python/branches/cpy_merge/Lib/pydoc.py python/branches/cpy_merge/Lib/random.py python/branches/cpy_merge/Lib/repr.py python/branches/cpy_merge/Lib/sqlite3/test/dbapi.py python/branches/cpy_merge/Lib/sre_parse.py python/branches/cpy_merge/Lib/stat.py python/branches/cpy_merge/Lib/string.py python/branches/cpy_merge/Lib/subprocess.py python/branches/cpy_merge/Lib/tarfile.py python/branches/cpy_merge/Lib/tempfile.py python/branches/cpy_merge/Lib/test/exception_hierarchy.txt python/branches/cpy_merge/Lib/test/list_tests.py python/branches/cpy_merge/Lib/test/output/test_class python/branches/cpy_merge/Lib/test/output/test_tokenize python/branches/cpy_merge/Lib/test/regrtest.py python/branches/cpy_merge/Lib/test/string_tests.py python/branches/cpy_merge/Lib/test/test_array.py python/branches/cpy_merge/Lib/test/test_builtin.py python/branches/cpy_merge/Lib/test/test_bytes.py python/branches/cpy_merge/Lib/test/test_cgi.py python/branches/cpy_merge/Lib/test/test_class.py python/branches/cpy_merge/Lib/test/test_collections.py python/branches/cpy_merge/Lib/test/test_compile.py python/branches/cpy_merge/Lib/test/test_descr.py python/branches/cpy_merge/Lib/test/test_dumbdbm.py python/branches/cpy_merge/Lib/test/test_format.py python/branches/cpy_merge/Lib/test/test_grammar.py python/branches/cpy_merge/Lib/test/test_hexoct.py python/branches/cpy_merge/Lib/test/test_isinstance.py python/branches/cpy_merge/Lib/test/test_list.py python/branches/cpy_merge/Lib/test/test_logging.py python/branches/cpy_merge/Lib/test/test_long.py python/branches/cpy_merge/Lib/test/test_multibytecodec.py python/branches/cpy_merge/Lib/test/test_optparse.py python/branches/cpy_merge/Lib/test/test_peepholer.py python/branches/cpy_merge/Lib/test/test_pep352.py python/branches/cpy_merge/Lib/test/test_pyclbr.py python/branches/cpy_merge/Lib/test/test_repr.py python/branches/cpy_merge/Lib/test/test_str.py python/branches/cpy_merge/Lib/test/test_strptime.py python/branches/cpy_merge/Lib/test/test_structmembers.py python/branches/cpy_merge/Lib/test/test_subprocess.py python/branches/cpy_merge/Lib/test/test_sundry.py python/branches/cpy_merge/Lib/test/test_tarfile.py python/branches/cpy_merge/Lib/test/test_tempfile.py python/branches/cpy_merge/Lib/test/test_threading.py python/branches/cpy_merge/Lib/test/test_tuple.py python/branches/cpy_merge/Lib/test/test_unicode.py python/branches/cpy_merge/Lib/test/test_unicode_file.py python/branches/cpy_merge/Lib/test/test_unittest.py python/branches/cpy_merge/Lib/test/test_urllib2.py python/branches/cpy_merge/Lib/test/test_urllib2net.py python/branches/cpy_merge/Lib/test/test_userlist.py python/branches/cpy_merge/Lib/test/test_uu.py python/branches/cpy_merge/Lib/test/test_weakref.py python/branches/cpy_merge/Lib/test/test_xmlrpc.py python/branches/cpy_merge/Lib/test/test_zipimport.py python/branches/cpy_merge/Lib/test/tf_inherit_check.py python/branches/cpy_merge/Lib/test/tokenize_tests.txt python/branches/cpy_merge/Lib/threading.py python/branches/cpy_merge/Lib/tokenize.py python/branches/cpy_merge/Lib/types.py python/branches/cpy_merge/Lib/unittest.py python/branches/cpy_merge/Lib/urllib2.py python/branches/cpy_merge/Lib/uu.py python/branches/cpy_merge/Lib/warnings.py python/branches/cpy_merge/Lib/weakref.py python/branches/cpy_merge/Lib/wsgiref/headers.py python/branches/cpy_merge/Lib/wsgiref/validate.py python/branches/cpy_merge/Lib/xml/dom/domreg.py python/branches/cpy_merge/Lib/xml/sax/saxutils.py python/branches/cpy_merge/Lib/xmlrpclib.py python/branches/cpy_merge/Misc/ACKS python/branches/cpy_merge/Misc/NEWS python/branches/cpy_merge/Misc/Vim/python.vim python/branches/cpy_merge/Misc/build.sh python/branches/cpy_merge/Misc/cheatsheet python/branches/cpy_merge/Misc/python-mode.el python/branches/cpy_merge/Misc/valgrind-python.supp python/branches/cpy_merge/Modules/_bsddb.c python/branches/cpy_merge/Modules/_ctypes/_ctypes.c python/branches/cpy_merge/Modules/_ctypes/callbacks.c python/branches/cpy_merge/Modules/_ctypes/callproc.c python/branches/cpy_merge/Modules/_ctypes/cfield.c python/branches/cpy_merge/Modules/_ctypes/ctypes.h python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi.c python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi64.c python/branches/cpy_merge/Modules/_ctypes/stgdict.c python/branches/cpy_merge/Modules/_sqlite/cache.c python/branches/cpy_merge/Modules/_sqlite/module.c python/branches/cpy_merge/Modules/_testcapimodule.c python/branches/cpy_merge/Modules/cjkcodecs/multibytecodec.c python/branches/cpy_merge/Modules/getbuildinfo.c python/branches/cpy_merge/Modules/socketmodule.c python/branches/cpy_merge/Objects/abstract.c python/branches/cpy_merge/Objects/bufferobject.c python/branches/cpy_merge/Objects/exceptions.c python/branches/cpy_merge/Objects/intobject.c python/branches/cpy_merge/Objects/longobject.c python/branches/cpy_merge/Objects/stringobject.c python/branches/cpy_merge/Objects/typeobject.c python/branches/cpy_merge/Objects/unicodeobject.c python/branches/cpy_merge/PC/os2emx/python25.def python/branches/cpy_merge/PC/os2vacpp/python.def python/branches/cpy_merge/PC/pyconfig.h python/branches/cpy_merge/PCbuild/_bsddb.vcproj python/branches/cpy_merge/PCbuild/_ssl.mak python/branches/cpy_merge/PCbuild/build_ssl.bat python/branches/cpy_merge/PCbuild/build_ssl.py python/branches/cpy_merge/PCbuild/pcbuild.sln python/branches/cpy_merge/Parser/tokenizer.c python/branches/cpy_merge/Python/ast.c python/branches/cpy_merge/Python/bltinmodule.c python/branches/cpy_merge/Python/compile.c python/branches/cpy_merge/Python/mystrtoul.c python/branches/cpy_merge/Python/peephole.c python/branches/cpy_merge/Python/structmember.c python/branches/cpy_merge/Python/symtable.c python/branches/cpy_merge/README python/branches/cpy_merge/Tools/i18n/msgfmt.py python/branches/cpy_merge/Tools/pybench/Arithmetic.py python/branches/cpy_merge/Tools/pybench/CommandLine.py python/branches/cpy_merge/Tools/pybench/Numbers.py python/branches/cpy_merge/Tools/pybench/systimes.py python/branches/cpy_merge/Tools/scripts/classfix.py python/branches/cpy_merge/Tools/scripts/fixcid.py python/branches/cpy_merge/Tools/scripts/ftpmirror.py python/branches/cpy_merge/Tools/scripts/linktree.py python/branches/cpy_merge/Tools/scripts/methfix.py python/branches/cpy_merge/Tools/scripts/pathfix.py python/branches/cpy_merge/Tools/scripts/reindent.py (props changed) python/branches/cpy_merge/Tools/scripts/which.py python/branches/cpy_merge/Tools/unicode/makeunicodedata.py python/branches/cpy_merge/Tools/versioncheck/pyversioncheck.py python/branches/cpy_merge/Tools/webchecker/websucker.py python/branches/cpy_merge/configure python/branches/cpy_merge/configure.in python/branches/cpy_merge/setup.py Log: Merged revisions 55756-55971 via svnmerge from svn+ssh://pythondev at svn.python.org/python/branches/p3yk ................ r55794 | guido.van.rossum | 2007-06-06 18:29:22 -0400 (Wed, 06 Jun 2007) | 3 lines Make this compile in GCC 2.96, which does not allow interspersing declarations and code. ................ r55797 | neal.norwitz | 2007-06-07 03:00:57 -0400 (Thu, 07 Jun 2007) | 3 lines Get rid of some remnants of classic classes. types.ClassType == type. Also get rid of almost all uses of the types module and use the builtin name. ................ r55798 | neal.norwitz | 2007-06-07 03:12:36 -0400 (Thu, 07 Jun 2007) | 1 line Remove a use of types, verify commit hook works ................ r55809 | guido.van.rossum | 2007-06-07 14:11:29 -0400 (Thu, 07 Jun 2007) | 2 lines Fix syntax error introduced by Neal in last checkin. ................ r55837 | guido.van.rossum | 2007-06-08 19:04:42 -0400 (Fri, 08 Jun 2007) | 2 lines PEP 3119 -- the abc module. ................ r55838 | guido.van.rossum | 2007-06-08 20:38:55 -0400 (Fri, 08 Jun 2007) | 2 lines Implement part of PEP 3119 -- One Trick Ponies. ................ r55847 | guido.van.rossum | 2007-06-09 11:28:06 -0400 (Sat, 09 Jun 2007) | 2 lines Different way to do one trick ponies, allowing registration (per PEP strawman). ................ r55849 | guido.van.rossum | 2007-06-09 21:06:38 -0400 (Sat, 09 Jun 2007) | 3 lines Make sure that the magic looking for __hash__ (etc.) doesn't apply to real subclasses of Hashable. ................ r55852 | guido.van.rossum | 2007-06-10 11:29:51 -0400 (Sun, 10 Jun 2007) | 2 lines Add some more examples, e.g. generators and dict views. ................ r55853 | guido.van.rossum | 2007-06-10 11:31:59 -0400 (Sun, 10 Jun 2007) | 2 lines keys() and items() *are* containers -- just values() isn't. ................ r55864 | georg.brandl | 2007-06-10 18:29:40 -0400 (Sun, 10 Jun 2007) | 2 lines PEP 3127: new octal literals, binary literals. ................ r55865 | georg.brandl | 2007-06-10 18:31:37 -0400 (Sun, 10 Jun 2007) | 2 lines Some octal literal fixes in Tools. ................ r55866 | georg.brandl | 2007-06-10 18:37:43 -0400 (Sun, 10 Jun 2007) | 2 lines Tokenizer changes for PEP 3127. ................ r55867 | georg.brandl | 2007-06-10 18:37:55 -0400 (Sun, 10 Jun 2007) | 2 lines Some docs for PEP 3127. ................ r55868 | georg.brandl | 2007-06-10 18:44:39 -0400 (Sun, 10 Jun 2007) | 2 lines Missed a place in intobject.c. Is that used anymore anyway? ................ r55871 | neal.norwitz | 2007-06-10 21:31:49 -0400 (Sun, 10 Jun 2007) | 182 lines Merged revisions 55729-55868 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r55731 | neal.norwitz | 2007-06-01 00:29:12 -0700 (Fri, 01 Jun 2007) | 7 lines SF 1668596/1720897: distutils now copies data files even if package_dir is empty. This needs to be backported. I'm too tired tonight. It would be great if someone backports this if the buildbots are ok with it. Otherwise, I will try to get to it tomorrow. ........ r55732 | georg.brandl | 2007-06-01 04:33:33 -0700 (Fri, 01 Jun 2007) | 2 lines Bug #1722484: remove docstrings again when running with -OO. ........ r55735 | georg.brandl | 2007-06-01 12:20:27 -0700 (Fri, 01 Jun 2007) | 2 lines Fix wrong issue number. ........ r55739 | brett.cannon | 2007-06-01 20:02:29 -0700 (Fri, 01 Jun 2007) | 3 lines Have configure raise an error when building on AtheOS. Code specific to AtheOS will be removed in Python 2.7. ........ r55746 | neal.norwitz | 2007-06-02 11:33:53 -0700 (Sat, 02 Jun 2007) | 1 line Update expected birthday of 2.6 ........ r55751 | neal.norwitz | 2007-06-03 13:32:50 -0700 (Sun, 03 Jun 2007) | 10 lines Backout the original 'fix' to 1721309 which had no effect. Different versions of Berkeley DB handle this differently. The comments and bug report should have the details. Memory is allocated in 4.4 (and presumably earlier), but not in 4.5. Thus 4.5 has the free error, but not earlier versions. Mostly update comments, plus make the free conditional. This fix was already applied to the 2.5 branch. ........ r55752 | brett.cannon | 2007-06-03 16:13:41 -0700 (Sun, 03 Jun 2007) | 6 lines Make _strptime.TimeRE().pattern() use ``\s+`` for matching whitespace instead of ``\s*``. This prevents patterns from "stealing" bits from other patterns in order to make a match work. Closes bug #1730389. Will be backported. ........ r55766 | hyeshik.chang | 2007-06-05 11:16:52 -0700 (Tue, 05 Jun 2007) | 4 lines Fix build on FreeBSD. Bluetooth HCI API in FreeBSD is quite different from Linux's. Just fix the build for now but the code doesn't support the complete capability of HCI on FreeBSD yet. ........ r55770 | hyeshik.chang | 2007-06-05 11:58:51 -0700 (Tue, 05 Jun 2007) | 4 lines Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it reads a file that ends with incomplete sequence and sizehint argument for .read() is specified. ........ r55775 | hyeshik.chang | 2007-06-05 12:28:15 -0700 (Tue, 05 Jun 2007) | 2 lines Fix for Windows: close a temporary file before trying to delete it. ........ r55783 | guido.van.rossum | 2007-06-05 14:24:47 -0700 (Tue, 05 Jun 2007) | 2 lines Patch by Tim Delany (missing DECREF). SF #1731330. ........ r55785 | collin.winter | 2007-06-05 17:17:35 -0700 (Tue, 05 Jun 2007) | 3 lines Patch #1731049: make threading.py use a proper "raise" when checking internal state, rather than assert statements (which get stripped out by -O). ........ r55786 | facundo.batista | 2007-06-06 08:13:37 -0700 (Wed, 06 Jun 2007) | 4 lines FTP.ntransfercmd method now uses create_connection when passive, using the timeout received in connection time. ........ r55792 | facundo.batista | 2007-06-06 10:15:23 -0700 (Wed, 06 Jun 2007) | 7 lines Added an optional timeout parameter to function urllib2.urlopen, with tests in test_urllib2net.py (must have network resource enabled to execute them). Also modified test_urllib2.py because testing mock classes must take it into acount. Docs are also updated. ........ r55793 | thomas.heller | 2007-06-06 13:19:19 -0700 (Wed, 06 Jun 2007) | 1 line Build _ctypes and _ctypes_test in the ReleaseAMD64 configuration. ........ r55802 | georg.brandl | 2007-06-07 06:23:24 -0700 (Thu, 07 Jun 2007) | 3 lines Disallow function calls like foo(None=1). Backport from py3k rev. 55708 by Guido. ........ r55804 | georg.brandl | 2007-06-07 06:30:24 -0700 (Thu, 07 Jun 2007) | 2 lines Make reindent.py executable. ........ r55805 | georg.brandl | 2007-06-07 06:34:10 -0700 (Thu, 07 Jun 2007) | 2 lines Patch #1667860: Fix UnboundLocalError in urllib2. ........ r55821 | kristjan.jonsson | 2007-06-07 16:53:49 -0700 (Thu, 07 Jun 2007) | 1 line Fixing changes to getbuildinfo.c that broke linux builds ........ r55828 | thomas.heller | 2007-06-08 09:10:27 -0700 (Fri, 08 Jun 2007) | 1 line Make this test work with older Python releases where struct has no 't' format character. ........ r55829 | martin.v.loewis | 2007-06-08 10:29:20 -0700 (Fri, 08 Jun 2007) | 3 lines Bug #1733488: Fix compilation of bufferobject.c on AIX. Will backport to 2.5. ........ r55831 | thomas.heller | 2007-06-08 11:20:09 -0700 (Fri, 08 Jun 2007) | 2 lines [ 1715718 ] x64 clean compile patch for _ctypes, by Kristj?n Valur with small modifications. ........ r55832 | thomas.heller | 2007-06-08 12:01:06 -0700 (Fri, 08 Jun 2007) | 1 line Fix gcc warnings intruduced by passing Py_ssize_t to PyErr_Format calls. ........ r55833 | thomas.heller | 2007-06-08 12:08:31 -0700 (Fri, 08 Jun 2007) | 2 lines Fix wrong documentation, and correct the punktuation. Closes [1700455]. ........ r55834 | thomas.heller | 2007-06-08 12:14:23 -0700 (Fri, 08 Jun 2007) | 1 line Fix warnings by using proper function prototype. ........ r55839 | neal.norwitz | 2007-06-08 20:36:34 -0700 (Fri, 08 Jun 2007) | 7 lines Prevent expandtabs() on string and unicode objects from causing a segfault when a large width is passed on 32-bit platforms. Found by Google. It would be good for people to review this especially carefully and verify I don't have an off by one error and there is no other way to cause overflow. ........ r55841 | neal.norwitz | 2007-06-08 21:48:22 -0700 (Fri, 08 Jun 2007) | 1 line Use macro version of GET_SIZE to avoid Coverity warning (#150) about a possible error. ........ r55842 | martin.v.loewis | 2007-06-09 00:42:52 -0700 (Sat, 09 Jun 2007) | 3 lines Patch #1733960: Allow T_LONGLONG to accept ints. Will backport to 2.5. ........ r55843 | martin.v.loewis | 2007-06-09 00:58:05 -0700 (Sat, 09 Jun 2007) | 2 lines Fix Windows build. ........ r55845 | martin.v.loewis | 2007-06-09 03:10:26 -0700 (Sat, 09 Jun 2007) | 2 lines Provide LLONG_MAX for S390. ........ r55854 | thomas.heller | 2007-06-10 08:59:17 -0700 (Sun, 10 Jun 2007) | 4 lines First version of build scripts for Windows/AMD64 (no external components are built yet, and 'kill_python' is disabled). ........ r55855 | thomas.heller | 2007-06-10 10:55:51 -0700 (Sun, 10 Jun 2007) | 3 lines For now, disable the _bsddb, _sqlite3, _ssl, _testcapi, _tkinter modules in the ReleaseAMD64 configuration because they do not compile. ........ r55856 | thomas.heller | 2007-06-10 11:27:54 -0700 (Sun, 10 Jun 2007) | 1 line Need to set the environment variables, otherwise devenv.com is not found. ........ r55860 | thomas.heller | 2007-06-10 14:01:17 -0700 (Sun, 10 Jun 2007) | 1 line Revert commit 55855. ........ ................ r55880 | neal.norwitz | 2007-06-11 01:07:36 -0400 (Mon, 11 Jun 2007) | 5 lines Fix the refleak counter on test_collections. The ABC metaclass creates a registry which must be cleared on each run. Otherwise, there *seem* to be refleaks when there really aren't any. (The class is held within the registry even though it's no longer needed.) ................ r55884 | neal.norwitz | 2007-06-11 01:46:33 -0400 (Mon, 11 Jun 2007) | 1 line These tests have been removed, so they are no longer needed here ................ r55886 | georg.brandl | 2007-06-11 03:26:37 -0400 (Mon, 11 Jun 2007) | 3 lines Optimize access to True and False in the compiler (if True) and the peepholer (LOAD_NAME True). ................ r55905 | georg.brandl | 2007-06-11 13:02:26 -0400 (Mon, 11 Jun 2007) | 5 lines Remove __oct__ and __hex__ and use __index__ for converting non-ints before formatting in a base. Add a bin() builtin. ................ r55906 | georg.brandl | 2007-06-11 13:04:44 -0400 (Mon, 11 Jun 2007) | 2 lines int(x, 0) does not "guess". ................ r55907 | georg.brandl | 2007-06-11 13:05:47 -0400 (Mon, 11 Jun 2007) | 2 lines Add a comment to explain that nb_oct and nb_hex are nonfunctional. ................ r55908 | guido.van.rossum | 2007-06-11 13:49:18 -0400 (Mon, 11 Jun 2007) | 2 lines Get rid of unused imports and comment. ................ r55910 | guido.van.rossum | 2007-06-11 16:05:17 -0400 (Mon, 11 Jun 2007) | 2 lines _Abstract.__new__ now requires either no arguments or __init__ overridden. ................ r55911 | guido.van.rossum | 2007-06-11 16:07:49 -0400 (Mon, 11 Jun 2007) | 7 lines Move the collections ABCs to a separate file, _abcoll.py, in order to avoid needing to import _collections.so during the bootstrap (this will become apparent in the next submit of os.py). Add (plain and mutable) ABCs for Set, Mapping, Sequence. ................ r55912 | guido.van.rossum | 2007-06-11 16:09:31 -0400 (Mon, 11 Jun 2007) | 2 lines Rewrite the _Environ class to use the new collections ABCs. ................ r55913 | guido.van.rossum | 2007-06-11 16:59:45 -0400 (Mon, 11 Jun 2007) | 72 lines Merged revisions 55869-55912 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r55869 | neal.norwitz | 2007-06-10 17:42:11 -0700 (Sun, 10 Jun 2007) | 1 line Add Atul Varma for patch # 1667860 ........ r55870 | neal.norwitz | 2007-06-10 18:22:03 -0700 (Sun, 10 Jun 2007) | 1 line Ignore valgrind problems on Ubuntu from ld ........ r55872 | neal.norwitz | 2007-06-10 18:48:46 -0700 (Sun, 10 Jun 2007) | 2 lines Ignore config.status.lineno which seems new (new autoconf?) ........ r55873 | neal.norwitz | 2007-06-10 19:14:39 -0700 (Sun, 10 Jun 2007) | 1 line Prevent these tests from running on Win64 since they don\'t apply there either ........ r55874 | neal.norwitz | 2007-06-10 19:16:10 -0700 (Sun, 10 Jun 2007) | 5 lines Fix a bug when there was a newline in the string expandtabs was called on. This also catches another condition that can overflow. Will backport. ........ r55879 | neal.norwitz | 2007-06-10 21:52:37 -0700 (Sun, 10 Jun 2007) | 1 line Prevent hang if the port cannot be opened. ........ r55881 | neal.norwitz | 2007-06-10 22:28:45 -0700 (Sun, 10 Jun 2007) | 4 lines Add all of the distuils modules that don't seem to have explicit tests. :-( Move an import in mworkscompiler so that this module can be imported on any platform. Hopefully this works on all platforms. ........ r55882 | neal.norwitz | 2007-06-10 22:35:10 -0700 (Sun, 10 Jun 2007) | 4 lines SF #1734732, lower case the module names per PEP 8. Will backport. ........ r55885 | neal.norwitz | 2007-06-10 23:16:48 -0700 (Sun, 10 Jun 2007) | 4 lines Not sure why this only fails sometimes on Unix machines. Better to disable it and only import msvccompiler on Windows since that's the only place it can work anyways. ........ r55887 | neal.norwitz | 2007-06-11 00:29:43 -0700 (Mon, 11 Jun 2007) | 4 lines Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. Will backport ........ r55889 | neal.norwitz | 2007-06-11 00:36:24 -0700 (Mon, 11 Jun 2007) | 1 line Reflow long line ........ r55896 | thomas.heller | 2007-06-11 08:58:33 -0700 (Mon, 11 Jun 2007) | 3 lines Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k" or "K" codes. ........ r55901 | facundo.batista | 2007-06-11 09:27:08 -0700 (Mon, 11 Jun 2007) | 5 lines Added versionchanged flag to all the methods which received a new optional timeout parameter, and a versionadded flag to the socket.create_connection function. ........ ................ r55914 | guido.van.rossum | 2007-06-11 17:19:50 -0400 (Mon, 11 Jun 2007) | 3 lines New super() implementation, for PEP 3135 (though the PEP is not yet updated to this design, and small tweaks may still be made later). ................ r55923 | guido.van.rossum | 2007-06-12 00:15:24 -0400 (Tue, 12 Jun 2007) | 4 lines I'm guessing this module broke when Neal ripped out the types module -- it used 'list' both as a local variable and as the built-in list type. Renamed the local variable since that was easier. ................ r55924 | guido.van.rossum | 2007-06-12 00:20:05 -0400 (Tue, 12 Jun 2007) | 5 lines Change all occurrences of super(, ) to super(). Seems to have worked, all the tests still pass. Exception: test_descr and test_descrtut, which have tons of these and are there to test the various usages. ................ r55939 | collin.winter | 2007-06-12 16:57:33 -0400 (Tue, 12 Jun 2007) | 1 line Patch #1735485: remove StandardError from the exception hierarchy. ................ r55954 | neal.norwitz | 2007-06-13 00:56:32 -0400 (Wed, 13 Jun 2007) | 51 lines Merged revisions 55913-55950 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ........ r55926 | marc-andre.lemburg | 2007-06-12 02:09:58 -0700 (Tue, 12 Jun 2007) | 3 lines Apply patch #1734945 to support TurboLinux as distribution. ........ r55927 | marc-andre.lemburg | 2007-06-12 02:26:49 -0700 (Tue, 12 Jun 2007) | 3 lines Add patch #1726668: Windows Vista support. ........ r55929 | thomas.heller | 2007-06-12 08:36:22 -0700 (Tue, 12 Jun 2007) | 1 line Checkout, but do not yet try to build, exernal sources. ........ r55930 | thomas.heller | 2007-06-12 09:08:27 -0700 (Tue, 12 Jun 2007) | 6 lines Add bufferoverflowU.lib to the libraries needed by _ssl (is this the right thing to do?). Set the /XP64 /RETAIL build enviroment in the makefile when building ReleaseAMD64. ........ r55931 | thomas.heller | 2007-06-12 09:23:19 -0700 (Tue, 12 Jun 2007) | 5 lines Revert this change, since it breaks the win32 build: Add bufferoverflowU.lib to the libraries needed by _ssl (is this the right thing to do?). ........ r55934 | thomas.heller | 2007-06-12 10:28:31 -0700 (Tue, 12 Jun 2007) | 3 lines Specify the bufferoverflowU.lib to the makefile on the command line (for ReleaseAMD64 builds). ........ r55937 | thomas.heller | 2007-06-12 12:02:59 -0700 (Tue, 12 Jun 2007) | 3 lines Add bufferoverflowU.lib to PCBuild\_bsddb.vcproj. Build sqlite3.dll and bsddb. ........ r55938 | thomas.heller | 2007-06-12 12:56:12 -0700 (Tue, 12 Jun 2007) | 2 lines Don't rebuild Berkeley DB if not needed (this was committed by accident). ........ r55948 | martin.v.loewis | 2007-06-12 20:42:19 -0700 (Tue, 12 Jun 2007) | 3 lines Provide PY_LLONG_MAX on all systems having long long. Will backport to 2.5. ........ ................ r55959 | guido.van.rossum | 2007-06-13 12:22:41 -0400 (Wed, 13 Jun 2007) | 2 lines Fix a compilation warning. ................ Modified: python/branches/cpy_merge/Doc/api/exceptions.tex ============================================================================== --- python/branches/cpy_merge/Doc/api/exceptions.tex (original) +++ python/branches/cpy_merge/Doc/api/exceptions.tex Thu Jun 14 21:06:29 2007 @@ -381,7 +381,6 @@ \begin{tableiii}{l|l|c}{cdata}{C Name}{Python Name}{Notes} \lineiii{PyExc_BaseException\ttindex{PyExc_BaseException}}{\exception{BaseException}}{(1), (4)} \lineiii{PyExc_Exception\ttindex{PyExc_Exception}}{\exception{Exception}}{(1)} - \lineiii{PyExc_StandardError\ttindex{PyExc_StandardError}}{\exception{StandardError}}{(1)} \lineiii{PyExc_ArithmeticError\ttindex{PyExc_ArithmeticError}}{\exception{ArithmeticError}}{(1)} \lineiii{PyExc_LookupError\ttindex{PyExc_LookupError}}{\exception{LookupError}}{(1)} \lineiii{PyExc_AssertionError\ttindex{PyExc_AssertionError}}{\exception{AssertionError}}{} Modified: python/branches/cpy_merge/Doc/lib/libctypes.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libctypes.tex (original) +++ python/branches/cpy_merge/Doc/lib/libctypes.tex Thu Jun 14 21:06:29 2007 @@ -437,8 +437,8 @@ expecting pointers to mutable memory. If you need mutable memory blocks, ctypes has a \code{create{\_}string{\_}buffer} function which creates these in various ways. The current memory block contents can be -accessed (or changed) with the \code{raw} property, if you want to access -it as NUL terminated string, use the \code{string} property: +accessed (or changed) with the \code{raw} property; if you want to access +it as NUL terminated string, use the \code{value} property: \begin{verbatim} >>> from ctypes import * >>> p = create_string_buffer(3) # create a 3 byte buffer, initialized to NUL bytes Modified: python/branches/cpy_merge/Doc/lib/libdecimal.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libdecimal.tex (original) +++ python/branches/cpy_merge/Doc/lib/libdecimal.tex Thu Jun 14 21:06:29 2007 @@ -845,7 +845,7 @@ The following table summarizes the hierarchy of signals: \begin{verbatim} - exceptions.ArithmeticError(exceptions.StandardError) + exceptions.ArithmeticError(exceptions.Exception) DecimalException Clamped DivisionByZero(DecimalException, exceptions.ZeroDivisionError) Modified: python/branches/cpy_merge/Doc/lib/libexcs.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libexcs.tex (original) +++ python/branches/cpy_merge/Doc/lib/libexcs.tex Thu Jun 14 21:06:29 2007 @@ -64,13 +64,6 @@ \versionchanged[Changed to inherit from \exception{BaseException}]{2.5} \end{excdesc} -\begin{excdesc}{StandardError} -The base class for all built-in exceptions except -\exception{StopIteration}, \exception{GeneratorExit}, -\exception{KeyboardInterrupt} and \exception{SystemExit}. -\exception{StandardError} itself is derived from \exception{Exception}. -\end{excdesc} - \begin{excdesc}{ArithmeticError} The base class for those built-in exceptions that are raised for various arithmetic errors: \exception{OverflowError}, @@ -143,9 +136,9 @@ \begin{excdesc}{GeneratorExit} Raise when a generator's \method{close()} method is called. - It directly inherits from \exception{Exception} instead of - \exception{StandardError} since it is technically not an error. \versionadded{2.5} + \versionchanged[Changed to inherit from Exception instead of + StandardError]{3.0} \end{excdesc} \begin{excdesc}{IOError} @@ -257,10 +250,9 @@ \begin{excdesc}{StopIteration} Raised by builtin \function{next()} and an iterator's \method{__next__()} method to signal that there are no further values. - This is derived from \exception{Exception} rather than - \exception{StandardError}, since this is not considered an error in - its normal application. \versionadded{2.2} + \versionchanged[Changed to inherit from Exception instead of + StandardError]{3.0} \end{excdesc} @@ -304,7 +296,7 @@ Instances have an attribute \member{code} which is set to the proposed exit status or error message (defaulting to \code{None}). Also, this exception derives directly from \exception{BaseException} and - not \exception{StandardError}, since it is not technically an error. + not \exception{Exception}, since it is not technically an error. A call to \function{sys.exit()} is translated into an exception so that clean-up handlers (\keyword{finally} clauses of \keyword{try} statements) @@ -315,7 +307,7 @@ \function{fork()}). The exception inherits from \exception{BaseException} instead of - \exception{StandardError} or \exception{Exception} so that it is not + \exception{Exception} so that it is not accidentally caught by code that catches \exception{Exception}. This allows the exception to properly propagate up and cause the interpreter to exit. \versionchanged[Changed to inherit from \exception{BaseException}]{2.5} Modified: python/branches/cpy_merge/Doc/lib/libftplib.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libftplib.tex (original) +++ python/branches/cpy_merge/Doc/lib/libftplib.tex Thu Jun 14 21:06:29 2007 @@ -46,6 +46,7 @@ The optional \var{timeout} parameter specifies a timeout in seconds for the connection attempt (if is not specified, or passed as None, the global default timeout setting will be used). +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{datadesc}{all_errors} @@ -117,6 +118,8 @@ object timeout is used (the timeout that you passed when instantiating the class); if the object timeout is also None, the global default timeout setting will be used. + +\versionchanged[\var{timeout} was added]{2.6} \end{methoddesc} \begin{methoddesc}[FTP]{getwelcome}{} Modified: python/branches/cpy_merge/Doc/lib/libfuncs.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libfuncs.tex (original) +++ python/branches/cpy_merge/Doc/lib/libfuncs.tex Thu Jun 14 21:06:29 2007 @@ -104,6 +104,14 @@ \versionadded{2.3} \end{funcdesc} +\begin{funcdesc}{bin}{x} + Convert an integer number to a binary string. + The result is a valid Python expression. If \var{x} is not a Python + \class{int} object, it has to define an \method{__index__} method + that returns an integer. + \versionadded{3.0} +\end{funcdesc} + \begin{funcdesc}{bool}{\optional{x}} Convert a value to a Boolean, using the standard truth testing procedure. If \var{x} is false or omitted, this returns @@ -540,8 +548,10 @@ \end{funcdesc} \begin{funcdesc}{hex}{x} - Convert an integer number (of any size) to a hexadecimal string. - The result is a valid Python expression. + Convert an integer number to a hexadecimal string. + The result is a valid Python expression. If \var{x} is not a Python + \class{int} object, it has to define an \method{__index__} method + that returns an integer. \versionchanged[Formerly only returned an unsigned literal]{2.4} \end{funcdesc} @@ -559,8 +569,7 @@ representable as a Python integer, possibly embedded in whitespace. The \var{radix} parameter gives the base for the conversion and may be any integer in the range [2, 36], or zero. If - \var{radix} is zero, the proper radix is guessed based on the - contents of string; the interpretation is the same as for integer + \var{radix} is zero, the interpretation is the same as for integer literals. If \var{radix} is specified and \var{x} is not a string, \exception{TypeError} is raised. Otherwise, the argument may be a plain or @@ -707,8 +716,10 @@ \end{funcdesc} \begin{funcdesc}{oct}{x} - Convert an integer number (of any size) to an octal string. The - result is a valid Python expression. + Convert an integer number to an octal string. The + result is a valid Python expression. If \var{x} is not a Python + \class{int} object, it has to define an \method{__index__} method + that returns an integer. \versionchanged[Formerly only returned an unsigned literal]{2.4} \end{funcdesc} Modified: python/branches/cpy_merge/Doc/lib/libhttplib.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libhttplib.tex (original) +++ python/branches/cpy_merge/Doc/lib/libhttplib.tex Thu Jun 14 21:06:29 2007 @@ -49,6 +49,7 @@ >>> h3 = httplib.HTTPConnection('www.cwi.nl', 80, timeout=10) \end{verbatim} \versionadded{2.0} +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{HTTPSConnection}{host\optional{, port\optional{, @@ -63,6 +64,7 @@ \warning{This does not do any certificate verification!} \versionadded{2.0} +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{HTTPResponse}{sock\optional{, debuglevel=0}\optional{, strict=0}} Modified: python/branches/cpy_merge/Doc/lib/libpoplib.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libpoplib.tex (original) +++ python/branches/cpy_merge/Doc/lib/libpoplib.tex Thu Jun 14 21:06:29 2007 @@ -35,6 +35,8 @@ The optional \var{timeout} parameter specifies a timeout in seconds for the connection attempt (if not specified, or passed as None, the global default timeout setting will be used). + +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{POP3_SSL}{host\optional{, port\optional{, keyfile\optional{, certfile}}}} Modified: python/branches/cpy_merge/Doc/lib/libsmtplib.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libsmtplib.tex (original) +++ python/branches/cpy_merge/Doc/lib/libsmtplib.tex Thu Jun 14 21:06:29 2007 @@ -29,6 +29,8 @@ For normal use, you should only require the initialization/connect, \method{sendmail()}, and \method{quit()} methods. An example is included below. + +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{SMTP_SSL}{\optional{host\optional{, port\optional{, @@ -45,6 +47,8 @@ The optional \var{timeout} parameter specifies a timeout in seconds for the connection attempt (if not specified, or passed as None, the global default timeout setting will be used). + +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} \begin{classdesc}{LMTP}{\optional{host\optional{, port\optional{, Modified: python/branches/cpy_merge/Doc/lib/libsocket.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libsocket.tex (original) +++ python/branches/cpy_merge/Doc/lib/libsocket.tex Thu Jun 14 21:06:29 2007 @@ -177,6 +177,7 @@ application-level code. Passing the optional \var{timeout} parameter will set the timeout on the socket instance (if it is not given or \code{None}, the global default timeout setting is used). +\versionadded{2.6} \end{funcdesc} \begin{funcdesc}{getaddrinfo}{host, port\optional{, family\optional{, Modified: python/branches/cpy_merge/Doc/lib/libtelnetlib.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libtelnetlib.tex (original) +++ python/branches/cpy_merge/Doc/lib/libtelnetlib.tex Thu Jun 14 21:06:29 2007 @@ -40,6 +40,7 @@ raise \exception{EOFError} when the end of the connection is read, because they can return an empty string for other reasons. See the individual descriptions below. +\versionchanged[\var{timeout} was added]{2.6} \end{classdesc} @@ -123,6 +124,7 @@ timeout setting will be used). Do not try to reopen an already connected instance. +\versionchanged[\var{timeout} was added]{2.6} \end{methoddesc} \begin{methoddesc}[Telnet]{msg}{msg\optional{, *args}} Modified: python/branches/cpy_merge/Doc/lib/libthreading.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/libthreading.tex (original) +++ python/branches/cpy_merge/Doc/lib/libthreading.tex Thu Jun 14 21:06:29 2007 @@ -174,11 +174,14 @@ unlocked, then the \method{acquire()} call resets it to locked and returns. The \method{release()} method should only be called in the locked state; it changes the state to unlocked and returns -immediately. When more than one thread is blocked in -\method{acquire()} waiting for the state to turn to unlocked, only one -thread proceeds when a \method{release()} call resets the state to -unlocked; which one of the waiting threads proceeds is not defined, -and may vary across implementations. +immediately. If an attempt is made to release an unlocked lock, a +\exception{RuntimeError} will be raised. + +When more than one thread is blocked in \method{acquire()} waiting for +the state to turn to unlocked, only one thread proceeds when a +\method{release()} call resets the state to unlocked; which one of the +waiting threads proceeds is not defined, and may vary across +implementations. All methods are executed atomically. @@ -257,8 +260,9 @@ decrement the recursion level is still nonzero, the lock remains locked and owned by the calling thread. -Only call this method when the calling thread owns the lock. -Do not call this method when the lock is unlocked. +Only call this method when the calling thread owns the lock. A +\exception{RuntimeError} is raised if this method is called when the +lock is unlocked. There is no return value. \end{methoddesc} @@ -275,7 +279,8 @@ methods that call the corresponding methods of the associated lock. It also has a \method{wait()} method, and \method{notify()} and \method{notifyAll()} methods. These three must only be called when -the calling thread has acquired the lock. +the calling thread has acquired the lock, otherwise a +\exception{RuntimeError} is raised. The \method{wait()} method releases the lock, and then blocks until it is awakened by a \method{notify()} or \method{notifyAll()} call for @@ -343,9 +348,9 @@ \end{methoddesc} \begin{methoddesc}{wait}{\optional{timeout}} -Wait until notified or until a timeout occurs. -This must only be called when the calling thread has acquired the -lock. +Wait until notified or until a timeout occurs. If the calling thread +has not acquired the lock when this method is called, a +\exception{RuntimeError} is raised. This method releases the underlying lock, and then blocks until it is awakened by a \method{notify()} or \method{notifyAll()} call for the @@ -367,9 +372,10 @@ \end{methoddesc} \begin{methoddesc}{notify}{} -Wake up a thread waiting on this condition, if any. -This must only be called when the calling thread has acquired the -lock. +Wake up a thread waiting on this condition, if any. Wait until +notified or until a timeout occurs. If the calling thread has not +acquired the lock when this method is called, a +\exception{RuntimeError} is raised. This method wakes up one of the threads waiting for the condition variable, if any are waiting; it is a no-op if no threads are waiting. @@ -386,7 +392,9 @@ \begin{methoddesc}{notifyAll}{} Wake up all threads waiting on this condition. This method acts like -\method{notify()}, but wakes up all waiting threads instead of one. +\method{notify()}, but wakes up all waiting threads instead of one. If +the calling thread has not acquired the lock when this method is +called, a \exception{RuntimeError} is raised. \end{methoddesc} @@ -404,8 +412,9 @@ calls \method{release()}. \begin{classdesc}{Semaphore}{\optional{value}} -The optional argument gives the initial value for the internal -counter; it defaults to \code{1}. +The optional argument gives the initial \var{value} for the internal +counter; it defaults to \code{1}. If the \var{value} given is less +than 0, \exception{ValueError} is raised. \end{classdesc} \begin{methoddesc}{acquire}{\optional{blocking}} @@ -586,9 +595,12 @@ \begin{methoddesc}{start}{} Start the thread's activity. -This must be called at most once per thread object. It -arranges for the object's \method{run()} method to be invoked in a -separate thread of control. +It must be called at most once per thread object. It arranges for the +object's \method{run()} method to be invoked in a separate thread of +control. + +This method will raise a \exception{RuntimeException} if called more +than once on the same thread object. \end{methoddesc} \begin{methoddesc}{run}{} @@ -618,11 +630,10 @@ A thread can be \method{join()}ed many times. -A thread cannot join itself because this would cause a -deadlock. - -It is an error to attempt to \method{join()} a thread before it has -been started. +\method{join()} may throw a \exception{RuntimeError}, if an attempt is +made to join the current thread as that would cause a deadlock. It is +also an error to \method{join()} a thread before it has been started +and attempts to do so raises same exception. \end{methoddesc} \begin{methoddesc}{getName}{} @@ -651,7 +662,8 @@ \begin{methoddesc}{setDaemon}{daemonic} Set the thread's daemon flag to the Boolean value \var{daemonic}. -This must be called before \method{start()} is called. +This must be called before \method{start()} is called, otherwise +\exception{RuntimeError} is raised. The initial value is inherited from the creating thread. Modified: python/branches/cpy_merge/Doc/lib/liburllib2.tex ============================================================================== --- python/branches/cpy_merge/Doc/lib/liburllib2.tex (original) +++ python/branches/cpy_merge/Doc/lib/liburllib2.tex Thu Jun 14 21:06:29 2007 @@ -14,7 +14,7 @@ The \module{urllib2} module defines the following functions: -\begin{funcdesc}{urlopen}{url\optional{, data}} +\begin{funcdesc}{urlopen}{url\optional{, data}\optional{, timeout}} Open the URL \var{url}, which can be either a string or a \class{Request} object. @@ -27,6 +27,11 @@ \function{urllib.urlencode()} function takes a mapping or sequence of 2-tuples and returns a string in this format. +The optional \var{timeout} parameter specifies a timeout in seconds for the +connection attempt (if not specified, or passed as None, the global default +timeout setting will be used). This actually only work for HTTP, HTTPS, FTP +and FTPS connections. + This function returns a file-like object with two additional methods: \begin{itemize} @@ -40,6 +45,8 @@ Note that \code{None} may be returned if no handler handles the request (though the default installed global \class{OpenerDirector} uses \class{UnknownHandler} to ensure this never happens). + +\versionchanged[\var{timeout} was added]{2.6} \end{funcdesc} \begin{funcdesc}{install_opener}{opener} @@ -351,12 +358,18 @@ \end{itemize} \end{methoddesc} -\begin{methoddesc}[OpenerDirector]{open}{url\optional{, data}} +\begin{methoddesc}[OpenerDirector]{open}{url\optional{, data}{\optional{, timeout}}} Open the given \var{url} (which can be a request object or a string), optionally passing the given \var{data}. Arguments, return values and exceptions raised are the same as those of \function{urlopen()} (which simply calls the \method{open()} method -on the currently installed global \class{OpenerDirector}). +on the currently installed global \class{OpenerDirector}). The optional +\var{timeout} parameter specifies a timeout in seconds for the connection +attempt (if not specified, or passed as None, the global default timeout +setting will be used; this actually only work for HTTP, HTTPS, FTP +and FTPS connections). + +\versionchanged[\var{timeout} was added]{2.6} \end{methoddesc} \begin{methoddesc}[OpenerDirector]{error}{proto\optional{, Modified: python/branches/cpy_merge/Doc/ref/ref2.tex ============================================================================== --- python/branches/cpy_merge/Doc/ref/ref2.tex (original) +++ python/branches/cpy_merge/Doc/ref/ref2.tex Thu Jun 14 21:06:29 2007 @@ -565,6 +565,7 @@ \index{floating point literal} \index{hexadecimal literal} \index{octal literal} +\index{binary literal} \index{decimal literal} \index{imaginary literal} \index{complex!literal} @@ -574,35 +575,32 @@ `\code{-}' and the literal \code{1}. -\subsection{Integer and long integer literals\label{integers}} +\subsection{Integer literals\label{integers}} -Integer and long integer literals are described by the following +Integer literals are described by the following lexical definitions: \begin{productionlist} - \production{longinteger} - {\token{integer} ("l" | "L")} \production{integer} {\token{decimalinteger} | \token{octinteger} | \token{hexinteger}} \production{decimalinteger} - {\token{nonzerodigit} \token{digit}* | "0"} + {\token{nonzerodigit} \token{digit}* | "0"+} \production{octinteger} - {"0" \token{octdigit}+} + {"0" ("o" | "O") \token{octdigit}+} \production{hexinteger} {"0" ("x" | "X") \token{hexdigit}+} + \production{bininteger} + {"0" ("b" | "B") \token{bindigit}+} \production{nonzerodigit} {"1"..."9"} \production{octdigit} {"0"..."7"} \production{hexdigit} {\token{digit} | "a"..."f" | "A"..."F"} + \production{bindigit} + {"0"..."1"} \end{productionlist} -Although both lower case \character{l} and upper case \character{L} are -allowed as suffix for long integers, it is strongly recommended to always -use \character{L}, since the letter \character{l} looks too much like the -digit \character{1}. - Plain integer literals that are above the largest representable plain integer (e.g., 2147483647 when using 32-bit arithmetic) are accepted as if they were long integers instead.\footnote{In versions of Python @@ -613,13 +611,16 @@ from their unsigned value.} There is no limit for long integer literals apart from what can be stored in available memory. -Some examples of plain integer literals (first row) and long integer -literals (second and third rows): +Note that leading zeros in a non-zero decimal number are not allowed. +This is for disambiguation with C-style octal literals, which Python +used before version 3.0. + +Some examples of integer literals: \begin{verbatim} -7 2147483647 0177 -3L 79228162514264337593543950336L 0377L 0x100000000L - 79228162514264337593543950336 0xdeadbeef +7 2147483647 0o177 0b100110111 +3 79228162514264337593543950336 0o377 0x100000000 + 79228162514264337593543950336 0xdeadbeef \end{verbatim} @@ -644,12 +645,10 @@ {("e" | "E") ["+" | "-"] \token{digit}+} \end{productionlist} -Note that the integer and exponent parts of floating point numbers -can look like octal integers, but are interpreted using radix 10. For -example, \samp{077e010} is legal, and denotes the same number -as \samp{77e10}. -The allowed range of floating point literals is -implementation-dependent. +Note that the integer and exponent parts are always interpreted using +radix 10. For example, \samp{077e010} is legal, and denotes the same +number as \samp{77e10}. +The allowed range of floating point literals is implementation-dependent. Some examples of floating point literals: \begin{verbatim} Modified: python/branches/cpy_merge/Doc/ref/ref3.tex ============================================================================== --- python/branches/cpy_merge/Doc/ref/ref3.tex (original) +++ python/branches/cpy_merge/Doc/ref/ref3.tex Thu Jun 14 21:06:29 2007 @@ -2033,17 +2033,11 @@ the appropriate type. \end{methoddesc} -\begin{methoddesc}[numeric object]{__oct__}{self} -\methodline[numeric object]{__hex__}{self} -Called to implement the built-in functions -\function{oct()}\bifuncindex{oct} and -\function{hex()}\bifuncindex{hex}. Should return a string value. -\end{methoddesc} - \begin{methoddesc}[numeric object]{__index__}{self} Called to implement \function{operator.index()}. Also called whenever -Python needs an integer object (such as in slicing). Must return an -integer (int or long). +Python needs an integer object (such as in slicing, or in the built-in +\function{bin()}, \function{hex()} and \function{oct()} functions). +Must return an integer (int or long). \versionadded{2.5} \end{methoddesc} Modified: python/branches/cpy_merge/Doc/tut/tut.tex ============================================================================== --- python/branches/cpy_merge/Doc/tut/tut.tex (original) +++ python/branches/cpy_merge/Doc/tut/tut.tex Thu Jun 14 21:06:29 2007 @@ -2689,7 +2689,7 @@ 'LookupError', 'MemoryError', 'NameError', 'None', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'ReferenceError', 'RuntimeError', - 'RuntimeWarning', 'StandardError', 'StopIteration', 'SyntaxError', + 'RuntimeWarning', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', @@ -2734,9 +2734,9 @@ hierarchical filesystem): \begin{verbatim} -Sound/ Top-level package +sound/ Top-level package __init__.py Initialize the sound package - Formats/ Subpackage for file format conversions + formats/ Subpackage for file format conversions __init__.py wavread.py wavwrite.py @@ -2745,13 +2745,13 @@ auread.py auwrite.py ... - Effects/ Subpackage for sound effects + effects/ Subpackage for sound effects __init__.py echo.py surround.py reverse.py ... - Filters/ Subpackage for filters + filters/ Subpackage for filters __init__.py equalizer.py vocoder.py @@ -2774,20 +2774,20 @@ package, for example: \begin{verbatim} -import Sound.Effects.echo +import sound.effects.echo \end{verbatim} -This loads the submodule \module{Sound.Effects.echo}. It must be referenced +This loads the submodule \module{sound.effects.echo}. It must be referenced with its full name. \begin{verbatim} -Sound.Effects.echo.echofilter(input, output, delay=0.7, atten=4) +sound.effects.echo.echofilter(input, output, delay=0.7, atten=4) \end{verbatim} An alternative way of importing the submodule is: \begin{verbatim} -from Sound.Effects import echo +from sound.effects import echo \end{verbatim} This also loads the submodule \module{echo}, and makes it available without @@ -2800,7 +2800,7 @@ Yet another variation is to import the desired function or variable directly: \begin{verbatim} -from Sound.Effects.echo import echofilter +from sound.effects.echo import echofilter \end{verbatim} Again, this loads the submodule \module{echo}, but this makes its function @@ -2827,7 +2827,7 @@ %The \code{__all__} Attribute \ttindex{__all__} -Now what happens when the user writes \code{from Sound.Effects import +Now what happens when the user writes \code{from sound.effects import *}? Ideally, one would hope that this somehow goes out to the filesystem, finds which submodules are present in the package, and imports them all. Unfortunately, this operation does not work very @@ -2849,19 +2849,19 @@ up-to-date when a new version of the package is released. Package authors may also decide not to support it, if they don't see a use for importing * from their package. For example, the file -\file{Sounds/Effects/__init__.py} could contain the following code: +\file{sounds/effects/__init__.py} could contain the following code: \begin{verbatim} __all__ = ["echo", "surround", "reverse"] \end{verbatim} -This would mean that \code{from Sound.Effects import *} would -import the three named submodules of the \module{Sound} package. +This would mean that \code{from sound.effects import *} would +import the three named submodules of the \module{sound} package. -If \code{__all__} is not defined, the statement \code{from Sound.Effects +If \code{__all__} is not defined, the statement \code{from sound.effects import *} does \emph{not} import all submodules from the package -\module{Sound.Effects} into the current namespace; it only ensures that the -package \module{Sound.Effects} has been imported (possibly running any +\module{sound.effects} into the current namespace; it only ensures that the +package \module{sound.effects} has been imported (possibly running any initialization code in \file{__init__.py}) and then imports whatever names are defined in the package. This includes any names defined (and submodules explicitly loaded) by \file{__init__.py}. It also includes any @@ -2869,14 +2869,14 @@ import statements. Consider this code: \begin{verbatim} -import Sound.Effects.echo -import Sound.Effects.surround -from Sound.Effects import * +import sound.effects.echo +import sound.effects.surround +from sound.effects import * \end{verbatim} In this example, the echo and surround modules are imported in the current namespace because they are defined in the -\module{Sound.Effects} package when the \code{from...import} statement +\module{sound.effects} package when the \code{from...import} statement is executed. (This also works when \code{__all__} is defined.) Note that in general the practice of importing \code{*} from a module or @@ -2904,12 +2904,12 @@ statement looks for a top-level module with the given name. When packages are structured into subpackages (as with the -\module{Sound} package in the example), there's no shortcut to refer +\module{sound} package in the example), there's no shortcut to refer to submodules of sibling packages - the full name of the subpackage must be used. For example, if the module -\module{Sound.Filters.vocoder} needs to use the \module{echo} module -in the \module{Sound.Effects} package, it can use \code{from -Sound.Effects import echo}. +\module{sound.filters.vocoder} needs to use the \module{echo} module +in the \module{sound.effects} package, it can use \code{from +sound.effects import echo}. Starting with Python 2.5, in addition to the implicit relative imports described above, you can write explicit relative imports with the @@ -2920,8 +2920,8 @@ \begin{verbatim} from . import echo -from .. import Formats -from ..Filters import equalizer +from .. import formats +from ..filters import equalizer \end{verbatim} Note that both explicit and implicit relative imports are based on the Modified: python/branches/cpy_merge/Doc/whatsnew/whatsnew26.tex ============================================================================== --- python/branches/cpy_merge/Doc/whatsnew/whatsnew26.tex (original) +++ python/branches/cpy_merge/Doc/whatsnew/whatsnew26.tex Thu Jun 14 21:06:29 2007 @@ -53,7 +53,7 @@ \tableofcontents This article explains the new features in Python 2.6. No release date -for Python 2.6 has been set; it will probably be released in late 2007. +for Python 2.6 has been set; it will probably be released in mid 2008. % Compare with previous release in 2 - 3 sentences here. Modified: python/branches/cpy_merge/Include/abstract.h ============================================================================== --- python/branches/cpy_merge/Include/abstract.h (original) +++ python/branches/cpy_merge/Include/abstract.h Thu Jun 14 21:06:29 2007 @@ -851,6 +851,14 @@ expression: o1 |= o2. */ + PyAPI_FUNC(PyObject *) PyNumber_ToBase(PyObject *n, int base); + + /* + Returns the integer n converted to a string with a base, with a base + marker of 0b, 0o or 0x prefixed if applicable. + If n is not an int object, it is converted with PyNumber_Index first. + */ + /* Sequence protocol:*/ Modified: python/branches/cpy_merge/Include/longobject.h ============================================================================== --- python/branches/cpy_merge/Include/longobject.h (original) +++ python/branches/cpy_merge/Include/longobject.h Thu Jun 14 21:06:29 2007 @@ -111,6 +111,11 @@ unsigned char* bytes, size_t n, int little_endian, int is_signed); + +/* _PyLong_Format: Convert the long to a string object with given base, + appending a base prefix of 0[box] if base is 2, 8 or 16. */ +PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base); + #ifdef __cplusplus } #endif Modified: python/branches/cpy_merge/Include/object.h ============================================================================== --- python/branches/cpy_merge/Include/object.h (original) +++ python/branches/cpy_merge/Include/object.h Thu Jun 14 21:06:29 2007 @@ -171,6 +171,7 @@ unaryfunc nb_int; unaryfunc nb_long; unaryfunc nb_float; + /* NB: nb_oct and nb_hex are not used anymore. */ unaryfunc nb_oct; unaryfunc nb_hex; Modified: python/branches/cpy_merge/Include/pyerrors.h ============================================================================== --- python/branches/cpy_merge/Include/pyerrors.h (original) +++ python/branches/cpy_merge/Include/pyerrors.h Thu Jun 14 21:06:29 2007 @@ -107,7 +107,6 @@ PyAPI_DATA(PyObject *) PyExc_Exception; PyAPI_DATA(PyObject *) PyExc_StopIteration; PyAPI_DATA(PyObject *) PyExc_GeneratorExit; -PyAPI_DATA(PyObject *) PyExc_StandardError; PyAPI_DATA(PyObject *) PyExc_ArithmeticError; PyAPI_DATA(PyObject *) PyExc_LookupError; Modified: python/branches/cpy_merge/Include/pyport.h ============================================================================== --- python/branches/cpy_merge/Include/pyport.h (original) +++ python/branches/cpy_merge/Include/pyport.h Thu Jun 14 21:06:29 2007 @@ -50,6 +50,22 @@ #ifdef HAVE_LONG_LONG #ifndef PY_LONG_LONG #define PY_LONG_LONG long long +#if defined(LLONG_MAX) +/* If LLONG_MAX is defined in limits.h, use that. */ +#define PY_LLONG_MIN LLONG_MIN +#define PY_LLONG_MAX LLONG_MAX +#define PY_ULLONG_MAX ULLONG_MAX +#elif defined(__LONG_LONG_MAX__) +/* Otherwise, if GCC has a builtin define, use that. */ +#define PY_LLONG_MAX __LONG_LONG_MAX__ +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL) +#else +/* Otherwise, rely on two's complement. */ +#define PY_ULLONG_MAX (~0ULL) +#define PY_LLONG_MAX ((long long)(PY_ULLONG_MAX>>1)) +#define PY_LLONG_MIN (-PY_LLONG_MAX-1) +#endif /* LLONG_MAX */ #endif #endif /* HAVE_LONG_LONG */ Modified: python/branches/cpy_merge/Lib/CGIHTTPServer.py ============================================================================== --- python/branches/cpy_merge/Lib/CGIHTTPServer.py (original) +++ python/branches/cpy_merge/Lib/CGIHTTPServer.py Thu Jun 14 21:06:29 2007 @@ -353,7 +353,7 @@ st = os.stat(path) except os.error: return False - return st.st_mode & 0111 != 0 + return st.st_mode & 0o111 != 0 def test(HandlerClass = CGIHTTPRequestHandler, Modified: python/branches/cpy_merge/Lib/_strptime.py ============================================================================== --- python/branches/cpy_merge/Lib/_strptime.py (original) +++ python/branches/cpy_merge/Lib/_strptime.py Thu Jun 14 21:06:29 2007 @@ -107,7 +107,7 @@ # magical; just happened to have used it everywhere else where a # static date was needed. am_pm = [] - for hour in (01,22): + for hour in (1, 22): time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) am_pm.append(time.strftime("%p", time_tuple).lower()) self.am_pm = am_pm @@ -186,7 +186,7 @@ self.locale_time = locale_time else: self.locale_time = LocaleTime() - base = super(TimeRE, self) + base = super() base.__init__({ # The " \d" part of the regex is to make %c from ANSI C work 'd': r"(?P3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", @@ -250,7 +250,7 @@ regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") format = regex_chars.sub(r"\\\1", format) whitespace_replacement = re_compile('\s+') - format = whitespace_replacement.sub('\s*', format) + format = whitespace_replacement.sub('\s+', format) while '%' in format: directive_index = format.index('%')+1 processed_format = "%s%s%s" % (processed_format, Modified: python/branches/cpy_merge/Lib/anydbm.py ============================================================================== --- python/branches/cpy_merge/Lib/anydbm.py (original) +++ python/branches/cpy_merge/Lib/anydbm.py Thu Jun 14 21:06:29 2007 @@ -3,7 +3,7 @@ Instead of import dbm - d = dbm.open(file, 'w', 0666) + d = dbm.open(file, 'w', 0o666) use @@ -63,7 +63,7 @@ error = tuple(_errors) -def open(file, flag = 'r', mode = 0666): +def open(file, flag = 'r', mode = 0o666): # guess the type of an existing database from whichdb import whichdb result=whichdb(file) Modified: python/branches/cpy_merge/Lib/bsddb/__init__.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/__init__.py (original) +++ python/branches/cpy_merge/Lib/bsddb/__init__.py Thu Jun 14 21:06:29 2007 @@ -294,7 +294,7 @@ #---------------------------------------------------------------------- # Compatibility object factory functions -def hashopen(file, flag='c', mode=0666, pgsize=None, ffactor=None, nelem=None, +def hashopen(file, flag='c', mode=0o666, pgsize=None, ffactor=None, nelem=None, cachesize=None, lorder=None, hflags=0): flags = _checkflag(flag, file) @@ -310,7 +310,7 @@ #---------------------------------------------------------------------- -def btopen(file, flag='c', mode=0666, +def btopen(file, flag='c', mode=0o666, btflags=0, cachesize=None, maxkeypage=None, minkeypage=None, pgsize=None, lorder=None): @@ -328,7 +328,7 @@ #---------------------------------------------------------------------- -def rnopen(file, flag='c', mode=0666, +def rnopen(file, flag='c', mode=0o666, rnflags=0, cachesize=None, pgsize=None, lorder=None, rlen=None, delim=None, source=None, pad=None): Modified: python/branches/cpy_merge/Lib/bsddb/dbshelve.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/dbshelve.py (original) +++ python/branches/cpy_merge/Lib/bsddb/dbshelve.py Thu Jun 14 21:06:29 2007 @@ -40,7 +40,7 @@ #------------------------------------------------------------------------ -def open(filename, flags=db.DB_CREATE, mode=0660, filetype=db.DB_HASH, +def open(filename, flags=db.DB_CREATE, mode=0o660, filetype=db.DB_HASH, dbenv=None, dbname=None): """ A simple factory function for compatibility with the standard Modified: python/branches/cpy_merge/Lib/bsddb/dbtables.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/dbtables.py (original) +++ python/branches/cpy_merge/Lib/bsddb/dbtables.py Thu Jun 14 21:06:29 2007 @@ -22,7 +22,6 @@ import copy import xdrlib import random -from types import ListType, StringType import cPickle as pickle try: @@ -39,7 +38,7 @@ class DBIncompleteError(Exception): pass -class TableDBError(StandardError): +class TableDBError(Exception): pass class TableAlreadyExists(TableDBError): pass @@ -135,9 +134,9 @@ class bsdTableDB : - def __init__(self, filename, dbhome, create=0, truncate=0, mode=0600, + def __init__(self, filename, dbhome, create=0, truncate=0, mode=0o600, recover=0, dbflags=0): - """bsdTableDB(filename, dbhome, create=0, truncate=0, mode=0600) + """bsdTableDB(filename, dbhome, create=0, truncate=0, mode=0o600) Open database name in the dbhome BerkeleyDB directory. Use keyword arguments when calling this constructor. @@ -229,7 +228,7 @@ raises TableDBError if it already exists or for other DB errors. """ - assert isinstance(columns, ListType) + assert isinstance(columns, list) txn = None try: # checking sanity of the table and column names here on @@ -270,7 +269,7 @@ """Return a list of columns in the given table. [] if the table doesn't exist. """ - assert isinstance(table, StringType) + assert isinstance(table, str) if contains_metastrings(table): raise ValueError, "bad table name: contains reserved metastrings" @@ -300,7 +299,7 @@ additional columns present in the given list as well as all of its current columns. """ - assert isinstance(columns, ListType) + assert isinstance(columns, list) try: self.CreateTable(table, columns) except TableAlreadyExists: Modified: python/branches/cpy_merge/Lib/bsddb/test/test_1413192.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/test/test_1413192.py (original) +++ python/branches/cpy_merge/Lib/bsddb/test/test_1413192.py Thu Jun 14 21:06:29 2007 @@ -18,4 +18,4 @@ the_txn = env.txn_begin() map = db.DB(env) -map.open('xxx.db', "p", db.DB_HASH, db.DB_CREATE, 0666, txn=the_txn) +map.open('xxx.db', "p", db.DB_HASH, db.DB_CREATE, 0o666, txn=the_txn) Modified: python/branches/cpy_merge/Lib/bsddb/test/test_basics.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/test/test_basics.py (original) +++ python/branches/cpy_merge/Lib/bsddb/test/test_basics.py Thu Jun 14 21:06:29 2007 @@ -44,7 +44,7 @@ dbtype = db.DB_UNKNOWN # must be set in derived class dbopenflags = 0 dbsetflags = 0 - dbmode = 0660 + dbmode = 0o660 dbname = None useEnv = 0 envflags = 0 Modified: python/branches/cpy_merge/Lib/bsddb/test/test_env_close.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/test/test_env_close.py (original) +++ python/branches/cpy_merge/Lib/bsddb/test/test_env_close.py Thu Jun 14 21:06:29 2007 @@ -50,10 +50,10 @@ dbenv = db.DBEnv() dbenv.open(self.homeDir, db.DB_INIT_CDB| db.DB_CREATE |db.DB_THREAD|db.DB_INIT_MPOOL, - 0666) + 0o666) d = db.DB(dbenv) - d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0666) + d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0o666) try: dbenv.close() @@ -75,10 +75,10 @@ dbenv = db.DBEnv() dbenv.open(self.homeDir, db.DB_INIT_CDB| db.DB_CREATE |db.DB_THREAD|db.DB_INIT_MPOOL, - 0666) + 0o666) d = db.DB(dbenv) - d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0666) + d.open(self.filename, db.DB_BTREE, db.DB_CREATE | db.DB_THREAD, 0o666) try: dbenv.close() Modified: python/branches/cpy_merge/Lib/bsddb/test/test_sequence.py ============================================================================== --- python/branches/cpy_merge/Lib/bsddb/test/test_sequence.py (original) +++ python/branches/cpy_merge/Lib/bsddb/test/test_sequence.py Thu Jun 14 21:06:29 2007 @@ -26,9 +26,9 @@ tempfile.tempdir = None self.dbenv = db.DBEnv() - self.dbenv.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL, 0666) + self.dbenv.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL, 0o666) self.d = db.DB(self.dbenv) - self.d.open(self.filename, db.DB_BTREE, db.DB_CREATE, 0666) + self.d.open(self.filename, db.DB_BTREE, db.DB_CREATE, 0o666) def tearDown(self): if hasattr(self, 'seq'): Modified: python/branches/cpy_merge/Lib/cgitb.py ============================================================================== --- python/branches/cpy_merge/Lib/cgitb.py (original) +++ python/branches/cpy_merge/Lib/cgitb.py Thu Jun 14 21:06:29 2007 @@ -96,10 +96,10 @@ def html(einfo, context=5): """Return a nice HTML document describing a given traceback.""" - import os, types, time, traceback, linecache, inspect, pydoc + import os, time, traceback, linecache, inspect, pydoc etype, evalue, etb = einfo - if type(etype) is types.ClassType: + if isinstance(etype, type): etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable date = time.ctime(time.time()) @@ -188,10 +188,10 @@ def text(einfo, context=5): """Return a plain text document describing a given traceback.""" - import os, types, time, traceback, linecache, inspect, pydoc + import os, time, traceback, linecache, inspect, pydoc etype, evalue, etb = einfo - if type(etype) is types.ClassType: + if isinstance(etype, type): etype = etype.__name__ pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable date = time.ctime(time.time()) Modified: python/branches/cpy_merge/Lib/collections.py ============================================================================== --- python/branches/cpy_merge/Lib/collections.py (original) +++ python/branches/cpy_merge/Lib/collections.py Thu Jun 14 21:06:29 2007 @@ -4,6 +4,13 @@ from operator import itemgetter as _itemgetter import sys as _sys +# For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. +# They should however be considered an integral part of collections.py. +from _abcoll import * +import _abcoll +__all__ += _abcoll.__all__ + + def NamedTuple(typename, s): """Returns a new subclass of tuple with named fields. Modified: python/branches/cpy_merge/Lib/copy.py ============================================================================== --- python/branches/cpy_merge/Lib/copy.py (original) +++ python/branches/cpy_merge/Lib/copy.py Thu Jun 14 21:06:29 2007 @@ -100,12 +100,15 @@ def _copy_immutable(x): return x for t in (type(None), int, float, bool, str, tuple, - frozenset, type, range, types.ClassType, + frozenset, type, range, types.BuiltinFunctionType, types.FunctionType): d[t] = _copy_immutable -for name in ("ComplexType", "UnicodeType", "CodeType"): - t = getattr(types, name, None) +t = getattr(types, "CodeType", None) +if t is not None: + d[t] = _copy_immutable +for name in ("complex", "unicode"): + t = globals()['__builtins__'].get(name) if t is not None: d[t] = _copy_immutable @@ -195,7 +198,6 @@ pass d[type] = _deepcopy_atomic d[range] = _deepcopy_atomic -d[types.ClassType] = _deepcopy_atomic d[types.BuiltinFunctionType] = _deepcopy_atomic d[types.FunctionType] = _deepcopy_atomic Modified: python/branches/cpy_merge/Lib/ctypes/__init__.py ============================================================================== --- python/branches/cpy_merge/Lib/ctypes/__init__.py (original) +++ python/branches/cpy_merge/Lib/ctypes/__init__.py Thu Jun 14 21:06:29 2007 @@ -149,7 +149,7 @@ _type_ = "O" def __repr__(self): try: - return super(py_object, self).__repr__() + return super().__repr__() except ValueError: return "%s()" % type(self).__name__ _check_size(py_object, "P") Modified: python/branches/cpy_merge/Lib/ctypes/_endian.py ============================================================================== --- python/branches/cpy_merge/Lib/ctypes/_endian.py (original) +++ python/branches/cpy_merge/Lib/ctypes/_endian.py Thu Jun 14 21:06:29 2007 @@ -29,7 +29,7 @@ rest = desc[2:] fields.append((name, _other_endian(typ)) + rest) value = fields - super(_swapped_meta, self).__setattr__(attrname, value) + super().__setattr__(attrname, value) ################################################################ Modified: python/branches/cpy_merge/Lib/ctypes/test/test_init.py ============================================================================== --- python/branches/cpy_merge/Lib/ctypes/test/test_init.py (original) +++ python/branches/cpy_merge/Lib/ctypes/test/test_init.py Thu Jun 14 21:06:29 2007 @@ -7,7 +7,7 @@ new_was_called = False def __new__(cls): - result = super(X, cls).__new__(cls) + result = super().__new__(cls) result.new_was_called = True return result Modified: python/branches/cpy_merge/Lib/ctypes/test/test_numbers.py ============================================================================== --- python/branches/cpy_merge/Lib/ctypes/test/test_numbers.py (original) +++ python/branches/cpy_merge/Lib/ctypes/test/test_numbers.py Thu Jun 14 21:06:29 2007 @@ -117,7 +117,10 @@ def test_sizes(self): for t in signed_types + unsigned_types + float_types + bool_types: - size = struct.calcsize(t._type_) + try: + size = struct.calcsize(t._type_) + except struct.error: + continue # sizeof of the type... self.failUnlessEqual(sizeof(t), size) # and sizeof of an instance Modified: python/branches/cpy_merge/Lib/dbhash.py ============================================================================== --- python/branches/cpy_merge/Lib/dbhash.py (original) +++ python/branches/cpy_merge/Lib/dbhash.py Thu Jun 14 21:06:29 2007 @@ -12,5 +12,5 @@ error = bsddb.error # Exported for anydbm -def open(file, flag = 'r', mode=0666): +def open(file, flag = 'r', mode=0o666): return bsddb.hashopen(file, flag, mode) Modified: python/branches/cpy_merge/Lib/dis.py ============================================================================== --- python/branches/cpy_merge/Lib/dis.py (original) +++ python/branches/cpy_merge/Lib/dis.py Thu Jun 14 21:06:29 2007 @@ -26,7 +26,7 @@ items = sorted(x.__dict__.items()) for name, x1 in items: if isinstance(x1, (types.MethodType, types.FunctionType, - types.CodeType, types.ClassType, type)): + types.CodeType, type)): print("Disassembly of %s:" % name) try: dis(x1) Modified: python/branches/cpy_merge/Lib/distutils/ccompiler.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/ccompiler.py (original) +++ python/branches/cpy_merge/Lib/distutils/ccompiler.py Thu Jun 14 21:06:29 2007 @@ -1040,7 +1040,7 @@ def move_file (self, src, dst): return move_file (src, dst, dry_run=self.dry_run) - def mkpath (self, name, mode=0777): + def mkpath (self, name, mode=0o777): mkpath (name, mode, self.dry_run) Modified: python/branches/cpy_merge/Lib/distutils/cmd.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/cmd.py (original) +++ python/branches/cpy_merge/Lib/distutils/cmd.py Thu Jun 14 21:06:29 2007 @@ -9,7 +9,6 @@ __revision__ = "$Id$" import sys, os, re -from types import * from distutils.errors import * from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log @@ -222,7 +221,7 @@ if val is None: setattr(self, option, default) return default - elif type(val) is not StringType: + elif not isinstance(val, str): raise DistutilsOptionError, \ "'%s' must be a %s (got `%s`)" % (option, what, val) return val @@ -242,12 +241,12 @@ val = getattr(self, option) if val is None: return - elif type(val) is StringType: + elif isinstance(val, str): setattr(self, option, re.split(r',\s*|\s+', val)) else: - if type(val) is ListType: + if isinstance(val, list): types = map(type, val) - ok = (types == [StringType] * len(val)) + ok = (types == [str] * len(val)) else: ok = 0 @@ -358,7 +357,7 @@ util.execute(func, args, msg, dry_run=self.dry_run) - def mkpath (self, name, mode=0777): + def mkpath (self, name, mode=0o777): dir_util.mkpath(name, mode, dry_run=self.dry_run) @@ -421,9 +420,9 @@ # Allow 'infiles' to be a single string - if type(infiles) is StringType: + if isinstance(infiles, str): infiles = (infiles,) - elif type(infiles) not in (ListType, TupleType): + elif not isinstance(infiles, (list, tuple)): raise TypeError, \ "'infiles' must be a string, or a list or tuple of strings" Modified: python/branches/cpy_merge/Lib/distutils/command/build_py.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/command/build_py.py (original) +++ python/branches/cpy_merge/Lib/distutils/command/build_py.py Thu Jun 14 21:06:29 2007 @@ -114,7 +114,9 @@ build_dir = os.path.join(*([self.build_lib] + package.split('.'))) # Length of path to strip from found files - plen = len(src_dir)+1 + plen = 0 + if src_dir: + plen = len(src_dir)+1 # Strip directory from globbed filenames filenames = [ Modified: python/branches/cpy_merge/Lib/distutils/command/build_scripts.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/command/build_scripts.py (original) +++ python/branches/cpy_merge/Lib/distutils/command/build_scripts.py Thu Jun 14 21:06:29 2007 @@ -119,8 +119,8 @@ if self.dry_run: log.info("changing mode of %s", file) else: - oldmode = os.stat(file)[ST_MODE] & 07777 - newmode = (oldmode | 0555) & 07777 + oldmode = os.stat(file)[ST_MODE] & 0o7777 + newmode = (oldmode | 0o555) & 0o7777 if newmode != oldmode: log.info("changing mode of %s from %o to %o", file, oldmode, newmode) Modified: python/branches/cpy_merge/Lib/distutils/command/install_scripts.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/command/install_scripts.py (original) +++ python/branches/cpy_merge/Lib/distutils/command/install_scripts.py Thu Jun 14 21:06:29 2007 @@ -53,7 +53,7 @@ if self.dry_run: log.info("changing mode of %s", file) else: - mode = ((os.stat(file)[ST_MODE]) | 0555) & 07777 + mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777 log.info("changing mode of %s to %o", file, mode) os.chmod(file, mode) Modified: python/branches/cpy_merge/Lib/distutils/command/register.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/command/register.py (original) +++ python/branches/cpy_merge/Lib/distutils/command/register.py Thu Jun 14 21:06:29 2007 @@ -183,7 +183,7 @@ username, password)) f.close() try: - os.chmod(rc, 0600) + os.chmod(rc, 0o600) except: pass elif choice == '2': Modified: python/branches/cpy_merge/Lib/distutils/dir_util.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/dir_util.py (original) +++ python/branches/cpy_merge/Lib/distutils/dir_util.py Thu Jun 14 21:06:29 2007 @@ -18,7 +18,7 @@ # I don't use os.makedirs because a) it's new to Python 1.5.2, and # b) it blows up if the directory already exists (I want to silently # succeed in that case). -def mkpath (name, mode=0777, verbose=0, dry_run=0): +def mkpath (name, mode=0o777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do @@ -85,7 +85,7 @@ # mkpath () -def create_tree (base_dir, files, mode=0777, verbose=0, dry_run=0): +def create_tree (base_dir, files, mode=0o777, verbose=0, dry_run=0): """Create all the empty directories under 'base_dir' needed to put 'files' there. 'base_dir' is just the a name of a directory Modified: python/branches/cpy_merge/Lib/distutils/dist.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/dist.py (original) +++ python/branches/cpy_merge/Lib/distutils/dist.py Thu Jun 14 21:06:29 2007 @@ -9,7 +9,6 @@ __revision__ = "$Id$" import sys, os, re -from types import * from copy import copy try: @@ -527,7 +526,7 @@ # Also make sure that the command object provides a list of its # known options. if not (hasattr(cmd_class, 'user_options') and - type(cmd_class.user_options) is ListType): + isinstance(cmd_class.user_options, list)): raise DistutilsClassError, \ ("command class %s must provide " + "'user_options' attribute (a list of tuples)") % \ @@ -543,7 +542,7 @@ # Check for help_options in command class. They have a different # format (tuple of four) so we need to preprocess them here. if (hasattr(cmd_class, 'help_options') and - type(cmd_class.help_options) is ListType): + isinstance(cmd_class.help_options, list)): help_options = fix_help_options(cmd_class.help_options) else: help_options = [] @@ -561,7 +560,7 @@ return if (hasattr(cmd_class, 'help_options') and - type(cmd_class.help_options) is ListType): + isinstance(cmd_class.help_options, list)): help_option_found=0 for (help_option, short, desc, func) in cmd_class.help_options: if hasattr(opts, parser.get_attr_name(help_option)): @@ -598,13 +597,13 @@ keywords = self.metadata.keywords if keywords is not None: - if type(keywords) is StringType: + if isinstance(keywords, str): keywordlist = keywords.split(',') self.metadata.keywords = [x.strip() for x in keywordlist] platforms = self.metadata.platforms if platforms is not None: - if type(platforms) is StringType: + if isinstance(platforms, str): platformlist = platforms.split(',') self.metadata.platforms = [x.strip() for x in platformlist] @@ -646,12 +645,12 @@ print() for command in self.commands: - if type(command) is ClassType and issubclass(command, Command): + if isinstance(command, type) and issubclass(command, Command): klass = command else: klass = self.get_command_class(command) if (hasattr(klass, 'help_options') and - type(klass.help_options) is ListType): + isinstance(klass.help_options, list)): parser.set_option_table(klass.user_options + fix_help_options(klass.help_options)) else: @@ -906,7 +905,7 @@ neg_opt = {} try: - is_string = type(value) is StringType + is_string = isinstance(value, str) if option in neg_opt and is_string: setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts and is_string: Modified: python/branches/cpy_merge/Lib/distutils/extension.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/extension.py (original) +++ python/branches/cpy_merge/Lib/distutils/extension.py Thu Jun 14 21:06:29 2007 @@ -6,7 +6,6 @@ __revision__ = "$Id$" import os, sys -from types import * try: import warnings @@ -103,9 +102,9 @@ language=None, **kw # To catch unknown keywords ): - assert type(name) is StringType, "'name' must be a string" - assert (type(sources) is ListType and - map(type, sources) == [StringType]*len(sources)), \ + assert isinstance(name, str), "'name' must be a string" + assert (isinstance(sources, list) and + map(type, sources) == [str]*len(sources)), \ "'sources' must be a list of strings" self.name = name Modified: python/branches/cpy_merge/Lib/distutils/mwerkscompiler.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/mwerkscompiler.py (original) +++ python/branches/cpy_merge/Lib/distutils/mwerkscompiler.py Thu Jun 14 21:06:29 2007 @@ -18,7 +18,6 @@ import distutils.util import distutils.dir_util from distutils import log -import mkcwproject class MWerksCompiler (CCompiler) : """Concrete class that implements an interface to MetroWerks CodeWarrior, @@ -188,6 +187,7 @@ # doesn't have a clue about our working directory. xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) log.debug("\tCreate XML file %s", xmlfilename) + import mkcwproject xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder.generate() xmldata = settings['tmp_projectxmldata'] Modified: python/branches/cpy_merge/Lib/distutils/tests/support.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/tests/support.py (original) +++ python/branches/cpy_merge/Lib/distutils/tests/support.py Thu Jun 14 21:06:29 2007 @@ -9,12 +9,12 @@ class LoggingSilencer(object): def setUp(self): - super(LoggingSilencer, self).setUp() + super().setUp() self.threshold = log.set_threshold(log.FATAL) def tearDown(self): log.set_threshold(self.threshold) - super(LoggingSilencer, self).tearDown() + super().tearDown() class TempdirManager(object): @@ -24,11 +24,11 @@ """ def setUp(self): - super(TempdirManager, self).setUp() + super().setUp() self.tempdirs = [] def tearDown(self): - super(TempdirManager, self).tearDown() + super().tearDown() while self.tempdirs: d = self.tempdirs.pop() shutil.rmtree(d) Modified: python/branches/cpy_merge/Lib/distutils/tests/test_build_py.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/tests/test_build_py.py (original) +++ python/branches/cpy_merge/Lib/distutils/tests/test_build_py.py Thu Jun 14 21:06:29 2007 @@ -1,10 +1,13 @@ """Tests for distutils.command.build_py.""" import os +import sys +import StringIO import unittest from distutils.command.build_py import build_py from distutils.core import Distribution +from distutils.errors import DistutilsFileError from distutils.tests import support @@ -53,6 +56,38 @@ self.assert_("__init__.pyc" in files) self.assert_("README.txt" in files) + def test_empty_package_dir (self): + # See SF 1668596/1720897. + cwd = os.getcwd() + + # create the distribution files. + sources = self.mkdtemp() + open(os.path.join(sources, "__init__.py"), "w").close() + + testdir = os.path.join(sources, "doc") + os.mkdir(testdir) + open(os.path.join(testdir, "testfile"), "w").close() + + os.chdir(sources) + sys.stdout = StringIO.StringIO() + + try: + dist = Distribution({"packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + finally: + # Restore state. + os.chdir(cwd) + sys.stdout = sys.__stdout__ def test_suite(): return unittest.makeSuite(BuildPyTestCase) Modified: python/branches/cpy_merge/Lib/distutils/text_file.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/text_file.py (original) +++ python/branches/cpy_merge/Lib/distutils/text_file.py Thu Jun 14 21:06:29 2007 @@ -6,7 +6,6 @@ __revision__ = "$Id$" -from types import * import sys, os @@ -137,7 +136,7 @@ if line is None: line = self.current_line outmsg.append(self.filename + ", ") - if type (line) in (ListType, TupleType): + if isinstance (line, (list, tuple)): outmsg.append("lines %d-%d: " % tuple (line)) else: outmsg.append("line %d: " % line) @@ -239,7 +238,7 @@ line = buildup_line + line # careful: pay attention to line number when incrementing it - if type (self.current_line) is ListType: + if isinstance (self.current_line, list): self.current_line[1] = self.current_line[1] + 1 else: self.current_line = [self.current_line, @@ -250,7 +249,7 @@ return None # still have to be careful about incrementing the line number! - if type (self.current_line) is ListType: + if isinstance (self.current_line, list): self.current_line = self.current_line[1] + 1 else: self.current_line = self.current_line + 1 Modified: python/branches/cpy_merge/Lib/distutils/unixccompiler.py ============================================================================== --- python/branches/cpy_merge/Lib/distutils/unixccompiler.py (original) +++ python/branches/cpy_merge/Lib/distutils/unixccompiler.py Thu Jun 14 21:06:29 2007 @@ -16,7 +16,6 @@ __revision__ = "$Id$" import os, sys -from types import StringType, NoneType from copy import copy from distutils import sysconfig @@ -212,7 +211,7 @@ lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) - if type(output_dir) not in (StringType, NoneType): + if not isinstance(output_dir, (str, type(None))): raise TypeError, "'output_dir' must be a string or None" if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) Modified: python/branches/cpy_merge/Lib/dumbdbm.py ============================================================================== --- python/branches/cpy_merge/Lib/dumbdbm.py (original) +++ python/branches/cpy_merge/Lib/dumbdbm.py Thu Jun 14 21:06:29 2007 @@ -219,7 +219,7 @@ self._os.chmod(file, self._mode) -def open(file, flag=None, mode=0666): +def open(file, flag=None, mode=0o666): """Open the database file, filename, and return corresponding object. The flag argument, used to control how the database is opened in the @@ -228,7 +228,7 @@ not exist. The optional mode argument is the UNIX mode of the file, used only when - the database has to be created. It defaults to octal code 0666 (and + the database has to be created. It defaults to octal code 0o666 (and will be modified by the prevailing umask). """ Modified: python/branches/cpy_merge/Lib/encodings/uu_codec.py ============================================================================== --- python/branches/cpy_merge/Lib/encodings/uu_codec.py (original) +++ python/branches/cpy_merge/Lib/encodings/uu_codec.py Thu Jun 14 21:06:29 2007 @@ -12,7 +12,7 @@ ### Codec APIs -def uu_encode(input,errors='strict',filename='',mode=0666): +def uu_encode(input,errors='strict',filename='',mode=0o666): """ Encodes the object input and returns a tuple (output object, length consumed). @@ -31,7 +31,7 @@ write = outfile.write # Encode - write('begin %o %s\n' % (mode & 0777, filename)) + write('begin %o %s\n' % (mode & 0o777, filename)) chunk = read(45) while chunk: write(b2a_uu(chunk)) Modified: python/branches/cpy_merge/Lib/ftplib.py ============================================================================== --- python/branches/cpy_merge/Lib/ftplib.py (original) +++ python/branches/cpy_merge/Lib/ftplib.py Thu Jun 14 21:06:29 2007 @@ -319,9 +319,7 @@ size = None if self.passiveserver: host, port = self.makepasv() - af, socktype, proto, canon, sa = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] - conn = socket.socket(af, socktype, proto) - conn.connect(sa) + conn = socket.create_connection((host, port), self.timeout) if rest is not None: self.sendcmd("REST %s" % rest) resp = self.sendcmd(cmd) Modified: python/branches/cpy_merge/Lib/idlelib/CallTips.py ============================================================================== --- python/branches/cpy_merge/Lib/idlelib/CallTips.py (original) +++ python/branches/cpy_merge/Lib/idlelib/CallTips.py Thu Jun 14 21:06:29 2007 @@ -131,14 +131,14 @@ arg_text = "" if ob is not None: arg_offset = 0 - if type(ob) in (types.ClassType, types.TypeType): + if isinstance(ob, type): # Look for the highest __init__ in the class chain. fob = _find_constructor(ob) if fob is None: fob = lambda: None else: arg_offset = 1 - elif type(ob)==types.MethodType: + elif isinstace(ob, types.MethodType): # bit of a hack for methods - turn it into a function # but we drop the "self" param. fob = ob.im_func @@ -146,7 +146,7 @@ else: fob = ob # Try to build one for Python defined functions - if type(fob) in [types.FunctionType, types.LambdaType]: + if isinstance(fob, (types.FunctionType, types.LambdaType)): argcount = fob.__code__.co_argcount real_args = fob.__code__.co_varnames[arg_offset:argcount] defaults = fob.__defaults__ or [] Modified: python/branches/cpy_merge/Lib/idlelib/ObjectBrowser.py ============================================================================== --- python/branches/cpy_merge/Lib/idlelib/ObjectBrowser.py (original) +++ python/branches/cpy_merge/Lib/idlelib/ObjectBrowser.py Thu Jun 14 21:06:29 2007 @@ -101,17 +101,14 @@ pass return keys -from types import * - dispatch = { - IntType: AtomicObjectTreeItem, - LongType: AtomicObjectTreeItem, - FloatType: AtomicObjectTreeItem, - StringType: AtomicObjectTreeItem, - TupleType: SequenceTreeItem, - ListType: SequenceTreeItem, - DictType: DictTreeItem, - ClassType: ClassTreeItem, + int: AtomicObjectTreeItem, + float: AtomicObjectTreeItem, + str: AtomicObjectTreeItem, + tuple: SequenceTreeItem, + list: SequenceTreeItem, + dict: DictTreeItem, + type: ClassTreeItem, } def make_objecttreeitem(labeltext, object, setfunction=None): Modified: python/branches/cpy_merge/Lib/idlelib/rpc.py ============================================================================== --- python/branches/cpy_merge/Lib/idlelib/rpc.py (original) +++ python/branches/cpy_merge/Lib/idlelib/rpc.py Thu Jun 14 21:06:29 2007 @@ -287,7 +287,7 @@ def _proxify(self, obj): if isinstance(obj, RemoteProxy): return RPCProxy(self, obj.oid) - if isinstance(obj, types.ListType): + if isinstance(obj, list): return map(self._proxify, obj) # XXX Check for other types -- not currently needed return obj @@ -574,7 +574,7 @@ attr = getattr(obj, name) if hasattr(attr, '__call__'): methods[name] = 1 - if type(obj) == types.ClassType: + if isinstance(obj, type): for super in obj.__bases__: _getmethods(super, methods) Modified: python/branches/cpy_merge/Lib/imputil.py ============================================================================== --- python/branches/cpy_merge/Lib/imputil.py (original) +++ python/branches/cpy_merge/Lib/imputil.py Thu Jun 14 21:06:29 2007 @@ -476,7 +476,7 @@ s = _os_stat(pathname) except OSError: return None - return (s.st_mode & 0170000) == 0040000 + return (s.st_mode & 0o170000) == 0o040000 def _timestamp(pathname): "Return the file modification time as a Long." Modified: python/branches/cpy_merge/Lib/inspect.py ============================================================================== --- python/branches/cpy_merge/Lib/inspect.py (original) +++ python/branches/cpy_merge/Lib/inspect.py Thu Jun 14 21:06:29 2007 @@ -47,7 +47,7 @@ Class objects provide these attributes: __doc__ documentation string __module__ name of module in which this class was defined""" - return isinstance(object, types.ClassType) or hasattr(object, '__bases__') + return isinstance(object, type) or hasattr(object, '__bases__') def ismethod(object): """Return true if the object is an instance method. @@ -313,7 +313,7 @@ doc = object.__doc__ except AttributeError: return None - if not isinstance(doc, types.StringTypes): + if not isinstance(doc, basestring): return None try: lines = doc.expandtabs().split('\n') Modified: python/branches/cpy_merge/Lib/lib-tk/ScrolledText.py ============================================================================== --- python/branches/cpy_merge/Lib/lib-tk/ScrolledText.py (original) +++ python/branches/cpy_merge/Lib/lib-tk/ScrolledText.py Thu Jun 14 21:06:29 2007 @@ -21,7 +21,7 @@ cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): - if type(k) == ClassType or k == 'name': + if isinstace(k, type) or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = Frame(master, **fcnf) Modified: python/branches/cpy_merge/Lib/lib-tk/Tkinter.py ============================================================================== --- python/branches/cpy_merge/Lib/lib-tk/Tkinter.py (original) +++ python/branches/cpy_merge/Lib/lib-tk/Tkinter.py Thu Jun 14 21:06:29 2007 @@ -38,7 +38,6 @@ import _tkinter # If this fails your Python may not be configured for Tk tkinter = _tkinter # b/w compat for export TclError = _tkinter.TclError -from types import * from Tkconstants import * try: import MacOS; _MacOS = MacOS; del MacOS @@ -61,11 +60,11 @@ except AttributeError: _tkinter.deletefilehandler = None -def _flatten(tuple): +def _flatten(seq): """Internal function.""" res = () - for item in tuple: - if type(item) in (TupleType, ListType): + for item in seq: + if isinstance(item, (tuple, list)): res = res + _flatten(item) elif item is not None: res = res + (item,) @@ -76,9 +75,9 @@ def _cnfmerge(cnfs): """Internal function.""" - if type(cnfs) is DictionaryType: + if isinstance(cnfs, dict): return cnfs - elif type(cnfs) in (NoneType, StringType): + elif isinstance(cnfs, (type(None), str)): return cnfs else: cnf = {} @@ -867,7 +866,7 @@ data = self.tk.split( self.tk.call('winfo', 'visualsavailable', self._w, includeids and 'includeids' or None)) - if type(data) is StringType: + if isinstance(data, str): data = [self.tk.split(data)] return map(self.__winfo_parseitem, data) def __winfo_parseitem(self, t): @@ -934,7 +933,7 @@ self.tk.call('bindtags', self._w, tagList) def _bind(self, what, sequence, func, add, needcleanup=1): """Internal function.""" - if type(func) is StringType: + if isinstance(func, str): self.tk.call(what + (sequence, func)) elif func: funcid = self._register(func, self._substitute, @@ -1181,7 +1180,7 @@ self.tk.call(_flatten((self._w, cmd)))): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf - if type(cnf) is StringType: + if isinstance(cnf, str): x = self.tk.split( self.tk.call(_flatten((self._w, cmd, '-'+cnf)))) return (x[0][1:],) + x[1:] @@ -1262,7 +1261,7 @@ bbox = grid_bbox def _grid_configure(self, command, index, cnf, kw): """Internal function.""" - if type(cnf) is StringType and not kw: + if isinstance(cnf, str) and not kw: if cnf[-1:] == '_': cnf = cnf[:-1] if cnf[:1] != '-': @@ -1923,7 +1922,7 @@ BaseWidget._setup(self, master, cnf) classes = [] for k in cnf.keys(): - if type(k) is ClassType: + if isinstance(k, type): classes.append((k, cnf[k])) del cnf[k] self.tk.call( @@ -2136,7 +2135,7 @@ """Internal function.""" args = _flatten(args) cnf = args[-1] - if type(cnf) in (DictionaryType, TupleType): + if isinstance(cnf, (dict, tuple)): args = args[:-1] else: cnf = {} @@ -3695,7 +3694,7 @@ 'paneconfigure', tagOrId)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf - if type(cnf) == StringType and not kw: + if isinstance(cnf, str) and not kw: x = self.tk.split(self.tk.call( self._w, 'paneconfigure', tagOrId, '-'+cnf)) return (x[0][1:],) + x[1:] Modified: python/branches/cpy_merge/Lib/logging/__init__.py ============================================================================== --- python/branches/cpy_merge/Lib/logging/__init__.py (original) +++ python/branches/cpy_merge/Lib/logging/__init__.py Thu Jun 14 21:06:29 2007 @@ -26,7 +26,7 @@ To use, simply 'import logging' and log away! """ -import sys, os, types, time, cStringIO, traceback +import sys, os, time, cStringIO, traceback try: import codecs @@ -48,6 +48,8 @@ # Miscellaneous module data #--------------------------------------------------------------------------- +_unicode = 'unicode' in dir(__builtins__) + # # _srcfile is used when walking the stack to check when we've got the first # caller stack frame. @@ -234,7 +236,7 @@ # 'Value is %d' instead of 'Value is 0'. # For the use case of passing a dictionary, this should not be a # problem. - if args and (len(args) == 1) and args[0] and (type(args[0]) == types.DictType): + if args and (len(args) == 1) and args[0] and isinstance(args[0], dict): args = args[0] self.args = args self.levelname = getLevelName(level) @@ -275,11 +277,11 @@ Return the message for this LogRecord after merging any user-supplied arguments with the message. """ - if not hasattr(types, "UnicodeType"): #if no unicode support... + if not _unicode: #if no unicode support... msg = str(self.msg) else: msg = self.msg - if type(msg) not in (types.UnicodeType, types.StringType): + if not isinstance(msg, basestring): try: msg = str(self.msg) except UnicodeError: @@ -743,7 +745,7 @@ try: msg = self.format(record) fs = "%s\n" - if not hasattr(types, "UnicodeType"): #if no unicode support... + if not _unicode: #if no unicode support... self.stream.write(fs % msg) else: try: @@ -1053,7 +1055,7 @@ logger.log(level, "We have a %s", "mysterious problem", exc_info=1) """ - if type(level) != types.IntType: + if not isinstance(level, int): if raiseExceptions: raise TypeError, "level must be an integer" else: @@ -1103,7 +1105,7 @@ else: fn, lno, func = "(unknown file)", 0, "(unknown function)" if exc_info: - if type(exc_info) != types.TupleType: + if not isinstance(exc_info, tuple): exc_info = sys.exc_info() record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra) self.handle(record) Modified: python/branches/cpy_merge/Lib/logging/config.py ============================================================================== --- python/branches/cpy_merge/Lib/logging/config.py (original) +++ python/branches/cpy_merge/Lib/logging/config.py Thu Jun 14 21:06:29 2007 @@ -27,7 +27,7 @@ To use, simply 'import logging' and log away! """ -import sys, logging, logging.handlers, socket, struct, os, traceback, types +import sys, logging, logging.handlers, socket, struct, os, traceback try: import thread @@ -289,7 +289,7 @@ traceback.print_exc() os.remove(file) except socket.error as e: - if type(e.args) != types.TupleType: + if not isinstancetype(e.args, tuple): raise else: errcode = e.args[0] Modified: python/branches/cpy_merge/Lib/logging/handlers.py ============================================================================== --- python/branches/cpy_merge/Lib/logging/handlers.py (original) +++ python/branches/cpy_merge/Lib/logging/handlers.py Thu Jun 14 21:06:29 2007 @@ -27,7 +27,7 @@ To use, simply 'import logging' and log away! """ -import sys, logging, socket, types, os, struct, time, glob +import sys, logging, socket, os, struct, time, glob try: import cPickle as pickle except ImportError: @@ -637,7 +637,7 @@ self.address = address self.facility = facility - if type(address) == types.StringType: + if isinstance(address, str): self.unixsocket = 1 self._connect_unixsocket(address) else: @@ -669,9 +669,9 @@ priority_names mapping dictionaries are used to convert them to integers. """ - if type(facility) == types.StringType: + if isinstance(facility, str): facility = self.facility_names[facility] - if type(priority) == types.StringType: + if isinstance(priority, str): priority = self.priority_names[priority] return (facility << 3) | priority @@ -738,16 +738,16 @@ for the credentials argument. """ logging.Handler.__init__(self) - if type(mailhost) == types.TupleType: + if isinstance(mailhost, tuple): self.mailhost, self.mailport = mailhost else: self.mailhost, self.mailport = mailhost, None - if type(credentials) == types.TupleType: + if isinstance(credentials, tuple): self.username, self.password = credentials else: self.username = None self.fromaddr = fromaddr - if type(toaddrs) == types.StringType: + if isinstance(toaddrs, str): toaddrs = [toaddrs] self.toaddrs = toaddrs self.subject = subject Modified: python/branches/cpy_merge/Lib/mailbox.py ============================================================================== --- python/branches/cpy_merge/Lib/mailbox.py (original) +++ python/branches/cpy_merge/Lib/mailbox.py Thu Jun 14 21:06:29 2007 @@ -227,10 +227,10 @@ Mailbox.__init__(self, dirname, factory, create) if not os.path.exists(self._path): if create: - os.mkdir(self._path, 0700) - os.mkdir(os.path.join(self._path, 'tmp'), 0700) - os.mkdir(os.path.join(self._path, 'new'), 0700) - os.mkdir(os.path.join(self._path, 'cur'), 0700) + os.mkdir(self._path, 0o700) + os.mkdir(os.path.join(self._path, 'tmp'), 0o700) + os.mkdir(os.path.join(self._path, 'new'), 0o700) + os.mkdir(os.path.join(self._path, 'cur'), 0o700) else: raise NoSuchMailboxError(self._path) self._toc = {} @@ -802,9 +802,9 @@ Mailbox.__init__(self, path, factory, create) if not os.path.exists(self._path): if create: - os.mkdir(self._path, 0700) + os.mkdir(self._path, 0o700) os.close(os.open(os.path.join(self._path, '.mh_sequences'), - os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0600)) + os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o600)) else: raise NoSuchMailboxError(self._path) self._locked = False Modified: python/branches/cpy_merge/Lib/mhlib.py ============================================================================== --- python/branches/cpy_merge/Lib/mhlib.py (original) +++ python/branches/cpy_merge/Lib/mhlib.py Thu Jun 14 21:06:29 2007 @@ -67,7 +67,7 @@ MH_PROFILE = '~/.mh_profile' PATH = '~/Mail' MH_SEQUENCES = '.mh_sequences' -FOLDER_PROTECT = 0700 +FOLDER_PROTECT = 0o700 # Imported modules Modified: python/branches/cpy_merge/Lib/new.py ============================================================================== --- python/branches/cpy_merge/Lib/new.py (original) +++ python/branches/cpy_merge/Lib/new.py Thu Jun 14 21:06:29 2007 @@ -4,7 +4,7 @@ Objects of most types can now be created by calling the type object. """ -from types import ClassType as classobj +classobj = type from types import FunctionType as function from types import MethodType as instancemethod from types import ModuleType as module Modified: python/branches/cpy_merge/Lib/optparse.py ============================================================================== --- python/branches/cpy_merge/Lib/optparse.py (original) +++ python/branches/cpy_merge/Lib/optparse.py Thu Jun 14 21:06:29 2007 @@ -67,7 +67,6 @@ """ import sys, os -import types import textwrap def _repr(self): @@ -641,7 +640,7 @@ # Python 2.1 and earlier, and is short-circuited by the # first check on modern Pythons.) import __builtin__ - if ( type(self.type) is types.TypeType or + if ( isinstance(self.type, type) or (hasattr(self.type, "__name__") and getattr(__builtin__, self.type.__name__, None) is self.type) ): self.type = self.type.__name__ @@ -660,7 +659,7 @@ if self.choices is None: raise OptionError( "must supply a list of choices for type 'choice'", self) - elif type(self.choices) not in (types.TupleType, types.ListType): + elif not isinstance(self.choices, (tuple, list)): raise OptionError( "choices must be a list of strings ('%s' supplied)" % str(type(self.choices)).split("'")[1], self) @@ -704,12 +703,12 @@ raise OptionError( "callback not callable: %r" % self.callback, self) if (self.callback_args is not None and - type(self.callback_args) is not types.TupleType): + not isinstance(self.callback_args, tuple)): raise OptionError( "callback_args, if supplied, must be a tuple: not %r" % self.callback_args, self) if (self.callback_kwargs is not None and - type(self.callback_kwargs) is not types.DictType): + not isinstance(self.callback_kwargs, dict)): raise OptionError( "callback_kwargs, if supplied, must be a dict: not %r" % self.callback_kwargs, self) @@ -817,7 +816,7 @@ SUPPRESS_USAGE = "SUPPRESS"+"USAGE" def isbasestring(x): - return isinstance(x, types.StringType) or isinstance(x, types.UnicodeType) + return isinstance(x, basestring) class Values: @@ -834,7 +833,7 @@ def __eq__(self, other): if isinstance(other, Values): return self.__dict__ == other.__dict__ - elif isinstance(other, types.DictType): + elif isinstance(other, dict): return self.__dict__ == other else: return NotImplemented @@ -995,7 +994,7 @@ """add_option(Option) add_option(opt_str, ..., kwarg=val, ...) """ - if type(args[0]) is types.StringType: + if isinstance(args[0], str): option = self.option_class(*args, **kwargs) elif len(args) == 1 and not kwargs: option = args[0] @@ -1306,7 +1305,7 @@ def add_option_group(self, *args, **kwargs): # XXX lots of overlap with OptionContainer.add_option() - if type(args[0]) is types.StringType: + if isinstance(args[0], str): group = OptionGroup(self, *args, **kwargs) elif len(args) == 1 and not kwargs: group = args[0] Modified: python/branches/cpy_merge/Lib/os.py ============================================================================== --- python/branches/cpy_merge/Lib/os.py (original) +++ python/branches/cpy_merge/Lib/os.py Thu Jun 14 21:06:29 2007 @@ -147,8 +147,8 @@ # Super directory utilities. # (Inspired by Eric Raymond; the doc strings are mostly his) -def makedirs(name, mode=0777): - """makedirs(path [, mode=0777]) +def makedirs(name, mode=0o777): + """makedirs(path [, mode=0o777]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not @@ -405,108 +405,63 @@ raise error, saved_exc, saved_tb raise error, last_exc, tb -# Change environ to automatically call putenv() if it exists -try: - # This will fail if there's no putenv - putenv -except NameError: - pass + +if name == "riscos": + # On RISC OS, all env access goes through getenv and putenv + from riscosenviron import _Environ else: - import UserDict + # Change environ to automatically call putenv(), unsetenv if they exist. + from _abcoll import MutableMapping # Can't use collections (bootstrap) - # Fake unsetenv() for Windows - # not sure about os2 here but - # I'm guessing they are the same. - - if name in ('os2', 'nt'): - def unsetenv(key): - putenv(key, "") - - if name == "riscos": - # On RISC OS, all env access goes through getenv and putenv - from riscosenviron import _Environ - elif name in ('os2', 'nt'): # Where Env Var Names Must Be UPPERCASE - # But we store them as upper case - class _Environ(UserDict.IterableUserDict): - def __init__(self, environ): - UserDict.UserDict.__init__(self) - data = self.data - for k, v in environ.items(): - data[k.upper()] = v - def __setitem__(self, key, item): - putenv(key, item) - self.data[key.upper()] = item - def __getitem__(self, key): - return self.data[key.upper()] - try: - unsetenv - except NameError: - def __delitem__(self, key): - del self.data[key.upper()] - else: - def __delitem__(self, key): - unsetenv(key) - del self.data[key.upper()] - def __contains__(self, key): - return key.upper() in self.data - def get(self, key, failobj=None): - return self.data.get(key.upper(), failobj) - def update(self, dict=None, **kwargs): - if dict: - try: - keys = dict.keys() - except AttributeError: - # List of (key, value) - for k, v in dict: - self[k] = v - else: - # got keys - # cannot use items(), since mappings - # may not have them. - for k in keys: - self[k] = dict[k] - if kwargs: - self.update(kwargs) - def copy(self): - return dict(self) + class _Environ(MutableMapping): + def __init__(self, environ, keymap, putenv, unsetenv): + self.keymap = keymap + self.putenv = putenv + self.unsetenv = unsetenv + self.data = data = {} + for key, value in environ.items(): + data[keymap(key)] = value + def __getitem__(self, key): + return self.data[self.keymap(key)] + def __setitem__(self, key, item): + self.putenv(key, item) + self.data[self.keymap(key)] = item + def __delitem__(self, key): + self.unsetenv(key) + del self.data[self.keymap(key)] + def __iter__(self): + for key in self.data: + yield key + def __len__(self): + return len(self.data) + def copy(self): + return dict(self) + def setdefault(self, key, value): + if key not in self: + self[key] = value + return self[key] + + try: + _putenv = putenv + except NameError: + _putenv = lambda key, value: None + else: + __all__.append("putenv") + try: + _unsetenv = unsetenv + except NameError: + _unsetenv = lambda key: _putenv(key, "") + else: + __all__.append("unsetenv") + + if name in ('os2', 'nt'): # Where Env Var Names Must Be UPPERCASE + _keymap = lambda key: key.upper() else: # Where Env Var Names Can Be Mixed Case - class _Environ(UserDict.IterableUserDict): - def __init__(self, environ): - UserDict.UserDict.__init__(self) - self.data = environ - def __setitem__(self, key, item): - putenv(key, item) - self.data[key] = item - def update(self, dict=None, **kwargs): - if dict: - try: - keys = dict.keys() - except AttributeError: - # List of (key, value) - for k, v in dict: - self[k] = v - else: - # got keys - # cannot use items(), since mappings - # may not have them. - for k in keys: - self[k] = dict[k] - if kwargs: - self.update(kwargs) - try: - unsetenv - except NameError: - pass - else: - def __delitem__(self, key): - unsetenv(key) - del self.data[key] - def copy(self): - return dict(self) + _keymap = lambda key: key + environ = _Environ(environ, _keymap, _putenv, _unsetenv) - environ = _Environ(environ) def getenv(key, default=None): """Get an environment variable, return None if it doesn't exist. Modified: python/branches/cpy_merge/Lib/pickle.py ============================================================================== --- python/branches/cpy_merge/Lib/pickle.py (original) +++ python/branches/cpy_merge/Lib/pickle.py Thu Jun 14 21:06:29 2007 @@ -26,7 +26,7 @@ __version__ = "$Revision$" # Code version -from types import * +from types import FunctionType, BuiltinFunctionType from copy_reg import dispatch_table from copy_reg import _extension_registry, _inverted_registry, _extension_cache import marshal @@ -89,11 +89,11 @@ except ImportError: PyStringMap = None -# UnicodeType may or may not be exported (normally imported from types) +# unicode may or may not be exported (normally imported from types) try: - UnicodeType + unicode except NameError: - UnicodeType = None + unicode = None # Pickle opcodes. See pickletools.py for extensive docs. The listing # here is in kind-of alphabetical order of 1-character pickle code. @@ -287,7 +287,7 @@ # Check for a class with a custom metaclass; treat as regular class try: - issc = issubclass(t, TypeType) + issc = issubclass(t, type) except TypeError: # t is not a class (old Boost; see SF #502085) issc = 0 if issc: @@ -312,12 +312,12 @@ (t.__name__, obj)) # Check for string returned by reduce(), meaning "save as global" - if type(rv) is StringType: + if isinstance(rv, str): self.save_global(obj, rv) return # Assert that reduce() returned a tuple - if type(rv) is not TupleType: + if not isinstance(rv, tuple): raise PicklingError("%s must return string or tuple" % reduce) # Assert that it returned an appropriately sized tuple @@ -346,7 +346,7 @@ # This API is called by some subclasses # Assert that args is a tuple or None - if not isinstance(args, TupleType): + if not isinstance(args, tuple): raise PicklingError("args from reduce() should be a tuple") # Assert that func is callable @@ -424,7 +424,7 @@ def save_none(self, obj): self.write(NONE) - dispatch[NoneType] = save_none + dispatch[type(None)] = save_none def save_bool(self, obj): if self.proto >= 2: @@ -456,7 +456,7 @@ # Text pickle, or int too big to fit in signed 4-byte format. self.write(INT + repr(obj) + '\n') # XXX save_int is merged into save_long - # dispatch[IntType] = save_int + # dispatch[int] = save_int def save_long(self, obj, pack=struct.pack): if self.bin: @@ -487,14 +487,14 @@ self.write(LONG4 + pack("d', obj)) else: self.write(FLOAT + repr(obj) + '\n') - dispatch[FloatType] = save_float + dispatch[float] = save_float def save_string(self, obj, pack=struct.pack): if self.bin: @@ -506,7 +506,7 @@ else: self.write(STRING + repr(obj) + '\n') self.memoize(obj) - dispatch[StringType] = save_string + dispatch[str] = save_string def save_unicode(self, obj, pack=struct.pack): if self.bin: @@ -518,9 +518,9 @@ obj = obj.replace("\n", "\\u000a") self.write(UNICODE + obj.encode('raw-unicode-escape') + '\n') self.memoize(obj) - dispatch[UnicodeType] = save_unicode + dispatch[unicode] = save_unicode - if StringType == UnicodeType: + if str == unicode: # This is true for Jython def save_string(self, obj, pack=struct.pack): unicode = obj.isunicode() @@ -546,7 +546,7 @@ else: self.write(STRING + repr(obj) + '\n') self.memoize(obj) - dispatch[StringType] = save_string + dispatch[str] = save_string def save_tuple(self, obj): write = self.write @@ -599,7 +599,7 @@ self.write(TUPLE) self.memoize(obj) - dispatch[TupleType] = save_tuple + dispatch[tuple] = save_tuple # save_empty_tuple() isn't used by anything in Python 2.3. However, I # found a Pickler subclass in Zope3 that calls it, so it's not harmless @@ -618,7 +618,7 @@ self.memoize(obj) self._batch_appends(iter(obj)) - dispatch[ListType] = save_list + dispatch[list] = save_list # Keep in synch with cPickle's BATCHSIZE. Nothing will break if it gets # out of synch, though. @@ -667,8 +667,8 @@ self.memoize(obj) self._batch_setitems(iter(obj.items())) - dispatch[DictionaryType] = save_dict - if not PyStringMap is None: + dispatch[dict] = save_dict + if PyStringMap is not None: dispatch[PyStringMap] = save_dict def _batch_setitems(self, items): @@ -746,10 +746,9 @@ write(GLOBAL + module + '\n' + name + '\n') self.memoize(obj) - dispatch[ClassType] = save_global dispatch[FunctionType] = save_global dispatch[BuiltinFunctionType] = save_global - dispatch[TypeType] = save_global + dispatch[type] = save_global # Pickling helpers @@ -1024,7 +1023,7 @@ del self.stack[k:] instantiated = 0 if (not args and - type(klass) is ClassType and + isinstance(klass, type) and not hasattr(klass, "__getinitargs__")): value = _EmptyClass() value.__class__ = klass Modified: python/branches/cpy_merge/Lib/pickletools.py ============================================================================== --- python/branches/cpy_merge/Lib/pickletools.py (original) +++ python/branches/cpy_merge/Lib/pickletools.py Thu Jun 14 21:06:29 2007 @@ -1517,7 +1517,7 @@ opcode is followed by code to create setstate's argument, and then a BUILD opcode to apply __setstate__ to that argument. - If type(callable) is not ClassType, REDUCE complains unless the + If not isinstance(callable, type), REDUCE complains unless the callable has been registered with the copy_reg module's safe_constructors dict, or the callable has a magic '__safe_for_unpickling__' attribute with a true value. I'm not sure @@ -1573,9 +1573,6 @@ + The argtuple is empty (markobject was at the top of the stack at the start). - + It's an old-style class object (the type of the class object is - ClassType). - + The class object does not have a __getinitargs__ attribute. then we want to create an old-style class instance without invoking Modified: python/branches/cpy_merge/Lib/plat-atheos/IN.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-atheos/IN.py (original) +++ python/branches/cpy_merge/Lib/plat-atheos/IN.py Thu Jun 14 21:06:29 2007 @@ -557,7 +557,7 @@ # Included from bits/dirent.h def _D_ALLOC_NAMLEN(d): return (_D_EXACT_NAMLEN (d) + 1) -def IFTODT(mode): return (((mode) & 0170000) >> 12) +def IFTODT(mode): return (((mode) & 0o170000) >> 12) def DTTOIF(dirtype): return ((dirtype) << 12) @@ -567,17 +567,17 @@ MAXNAMLEN = 255 # Included from posix/stat.h -S_IFMT = 00170000 -S_IFSOCK = 0140000 -S_IFLNK = 0120000 -S_IFREG = 0100000 -S_IFBLK = 0060000 -S_IFDIR = 0040000 -S_IFCHR = 0020000 -S_IFIFO = 0010000 -S_ISUID = 0004000 -S_ISGID = 0002000 -S_ISVTX = 0001000 +S_IFMT = 0o0170000 +S_IFSOCK = 0o140000 +S_IFLNK = 0o120000 +S_IFREG = 0o100000 +S_IFBLK = 0o060000 +S_IFDIR = 0o040000 +S_IFCHR = 0o020000 +S_IFIFO = 0o010000 +S_ISUID = 0o004000 +S_ISGID = 0o002000 +S_ISVTX = 0o001000 def S_ISLNK(m): return (((m) & S_IFMT) == S_IFLNK) def S_ISREG(m): return (((m) & S_IFMT) == S_IFREG) @@ -592,18 +592,18 @@ def S_ISSOCK(m): return (((m) & S_IFMT) == S_IFSOCK) -S_IRWXU = 00700 -S_IRUSR = 00400 -S_IWUSR = 00200 -S_IXUSR = 00100 -S_IRWXG = 00070 -S_IRGRP = 00040 -S_IWGRP = 00020 -S_IXGRP = 00010 -S_IRWXO = 00007 -S_IROTH = 00004 -S_IWOTH = 00002 -S_IXOTH = 00001 +S_IRWXU = 0o0700 +S_IRUSR = 0o0400 +S_IWUSR = 0o0200 +S_IXUSR = 0o0100 +S_IRWXG = 0o0070 +S_IRGRP = 0o0040 +S_IWGRP = 0o0020 +S_IXGRP = 0o0010 +S_IRWXO = 0o0007 +S_IROTH = 0o0004 +S_IWOTH = 0o0002 +S_IXOTH = 0o0001 S_IRWXUGO = (S_IRWXU|S_IRWXG|S_IRWXO) S_IALLUGO = (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) S_IRUGO = (S_IRUSR|S_IRGRP|S_IROTH) @@ -612,24 +612,24 @@ _STAT_VER_KERNEL = 0 # Included from posix/fcntl.h -O_ACCMODE = 0003 +O_ACCMODE = 0o003 O_RWMASK = O_ACCMODE O_RDONLY = 00 -O_WRONLY = 01 -O_RDWR = 02 -O_CREAT = 0100 -O_EXCL = 0200 -O_NOCTTY = 0400 -O_TRUNC = 01000 -O_APPEND = 02000 -O_NONBLOCK = 04000 +O_WRONLY = 0o1 +O_RDWR = 0o2 +O_CREAT = 0o100 +O_EXCL = 0o200 +O_NOCTTY = 0o400 +O_TRUNC = 0o1000 +O_APPEND = 0o2000 +O_NONBLOCK = 0o4000 O_NDELAY = O_NONBLOCK -O_SYNC = 010000 +O_SYNC = 0o10000 O_FSYNC = O_SYNC -O_ASYNC = 020000 +O_ASYNC = 0o20000 FASYNC = O_ASYNC -O_DIRECTORY = 040000 -O_NOTRAVERSE = 0100000 +O_DIRECTORY = 0o40000 +O_NOTRAVERSE = 0o100000 O_NOFOLLOW = O_NOTRAVERSE F_DUPFD = 0 F_GETFD = 1 Modified: python/branches/cpy_merge/Lib/plat-mac/aepack.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/aepack.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/aepack.py Thu Jun 14 21:06:29 2007 @@ -13,8 +13,6 @@ # import struct -import types -from types import * from Carbon import AE from Carbon.AppleEvents import * import MacOS @@ -74,7 +72,7 @@ """Pack a python object into an AE descriptor""" if forcetype: - if type(x) is StringType: + if isinstance(x, str): return AE.AECreateDesc(forcetype, x) else: return pack(x).AECoerceDesc(forcetype) @@ -90,29 +88,29 @@ return AE.AECreateDesc('fsrf', x.data) if isinstance(x, AliasType): return AE.AECreateDesc('alis', x.data) - if isinstance(x, IntType): + if isinstance(x, int): return AE.AECreateDesc('long', struct.pack('l', x)) - if isinstance(x, FloatType): + if isinstance(x, float): return AE.AECreateDesc('doub', struct.pack('d', x)) - if isinstance(x, StringType): + if isinstance(x, str): return AE.AECreateDesc('TEXT', x) - if isinstance(x, UnicodeType): + if isinstance(x, unicode): data = x.encode('utf16') if data[:2] == '\xfe\xff': data = data[2:] return AE.AECreateDesc('utxt', data) - if isinstance(x, ListType): - list = AE.AECreateList('', 0) + if isinstance(x, list): + lst = AE.AECreateList('', 0) for item in x: - list.AEPutDesc(0, pack(item)) - return list - if isinstance(x, DictionaryType): + lst.AEPutDesc(0, pack(item)) + return lst + if isinstance(x, dict): record = AE.AECreateList('', 1) for key, value in x.items(): packkey(record, key, value) #record.AEPutParamDesc(key, pack(value)) return record - if type(x) == types.ClassType and issubclass(x, ObjectSpecifier): + if isinstance(x, type) and issubclass(x, ObjectSpecifier): # Note: we are getting a class object here, not an instance return AE.AECreateDesc('type', x.want) if hasattr(x, '__aepack__'): @@ -340,7 +338,7 @@ # to __class__ is safe. Moreover, shouldn't there be a better # initializer for the classes in the suites? def mkobjectfrommodule(dict, modulename): - if type(dict['want']) == types.ClassType and issubclass(dict['want'], ObjectSpecifier): + if isinstance(dict['want'], type) and issubclass(dict['want'], ObjectSpecifier): # The type has already been converted to Python. Convert back:-( classtype = dict['want'] dict['want'] = aetypes.mktype(classtype.want) Modified: python/branches/cpy_merge/Lib/plat-mac/aetypes.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/aetypes.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/aetypes.py Thu Jun 14 21:06:29 2007 @@ -2,7 +2,6 @@ from Carbon.AppleEvents import * import struct -from types import * # # convoluted, since there are cyclic dependencies between this file and @@ -14,7 +13,7 @@ def nice(s): """'nice' representation of an object""" - if type(s) is StringType: return repr(s) + if isinstance(s, str): return repr(s) else: return str(s) class Unknown: @@ -222,7 +221,7 @@ return "Logical(%r, %r)" % (self.logc, self.term) def __str__(self): - if type(self.term) == ListType and len(self.term) == 2: + if isinstance(self.term, list) and len(self.term) == 2: return "%s %s %s" % (nice(self.term[0]), self.logc.strip(), nice(self.term[1])) @@ -481,13 +480,13 @@ def __init__(self, want, seld, fr = None): t = type(seld) - if t == StringType: + if isinstance(t, str): form = 'name' elif IsRange(seld): form = 'rang' elif IsComparison(seld) or IsLogical(seld): form = 'test' - elif t == TupleType: + elif isinstance(t, tuple): # Breakout: specify both form and seld in a tuple # (if you want ID or rele or somesuch) form, seld = seld @@ -513,7 +512,7 @@ def __str__(self): seld = self.seld - if type(seld) == StringType: + if isinstance(seld, str): ss = repr(seld) elif IsRange(seld): start, stop = seld.start, seld.stop Modified: python/branches/cpy_merge/Lib/plat-mac/bundlebuilder.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/bundlebuilder.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/bundlebuilder.py Thu Jun 14 21:06:29 2007 @@ -504,7 +504,7 @@ standalone = self.standalone semi_standalone = self.semi_standalone open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals()) - os.chmod(bootstrappath, 0775) + os.chmod(bootstrappath, 0o775) if self.iconfile is not None: iconbase = os.path.basename(self.iconfile) @@ -603,7 +603,7 @@ walk(path) else: mod = os.stat(path)[stat.ST_MODE] - if not (mod & 0100): + if not (mod & 0o100): continue relpath = path[len(self.bundlepath):] self.message("Stripping %s" % relpath, 2) Modified: python/branches/cpy_merge/Lib/plat-mac/gensuitemodule.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/gensuitemodule.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/gensuitemodule.py Thu Jun 14 21:06:29 2007 @@ -279,9 +279,9 @@ def simplify(item): """Recursively replace singleton tuples by their constituent item""" - if type(item) is types.ListType: + if isinstance(item, list): return map(simplify, item) - elif type(item) == types.TupleType and len(item) == 2: + elif isinstance(item, tuple) and len(item) == 2: return simplify(item[1]) else: return item @@ -352,7 +352,7 @@ def generic(what, f, *args): if type(what) == types.FunctionType: return what(f, *args) - if type(what) == types.ListType: + if isinstance(what, list): record = [] for thing in what: item = generic(thing[:1], f, *thing[1:]) Modified: python/branches/cpy_merge/Lib/plat-mac/macostools.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/macostools.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/macostools.py Thu Jun 14 21:06:29 2007 @@ -61,7 +61,7 @@ if os.sep == ':' and not ':' in head: head = head + ':' mkdirs(head) - os.mkdir(dst, 0777) + os.mkdir(dst, 0o777) def touched(dst): """Tell the finder a file has changed. No-op on MacOSX.""" Modified: python/branches/cpy_merge/Lib/plat-mac/plistlib.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-mac/plistlib.py (original) +++ python/branches/cpy_merge/Lib/plat-mac/plistlib.py Thu Jun 14 21:06:29 2007 @@ -320,7 +320,7 @@ from warnings import warn warn("The plistlib.Dict class is deprecated, use builtin dict instead", PendingDeprecationWarning) - super(Dict, self).__init__(**kwargs) + super().__init__(**kwargs) class Plist(_InternalDict): @@ -333,7 +333,7 @@ from warnings import warn warn("The Plist class is deprecated, use the readPlist() and " "writePlist() functions instead", PendingDeprecationWarning) - super(Plist, self).__init__(**kwargs) + super().__init__(**kwargs) def fromFile(cls, pathOrFile): """Deprecated. Use the readPlist() function instead.""" Modified: python/branches/cpy_merge/Lib/plat-sunos5/IN.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-sunos5/IN.py (original) +++ python/branches/cpy_merge/Lib/plat-sunos5/IN.py Thu Jun 14 21:06:29 2007 @@ -97,7 +97,7 @@ NZERO = 20 NULL = 0 NULL = 0 -CMASK = 022 +CMASK = 0o22 CDLIMIT = (1<<11) NBPS = 0x20000 NBPSCTR = 512 @@ -733,13 +733,13 @@ _XRS_ID = 0x78727300 GETCONTEXT = 0 SETCONTEXT = 1 -UC_SIGMASK = 001 -UC_STACK = 002 -UC_CPU = 004 -UC_MAU = 010 +UC_SIGMASK = 0o01 +UC_STACK = 0o02 +UC_CPU = 0o04 +UC_MAU = 0o10 UC_FPU = UC_MAU -UC_INTR = 020 -UC_ASR = 040 +UC_INTR = 0o20 +UC_ASR = 0o40 UC_MCONTEXT = (UC_CPU|UC_FPU|UC_ASR) UC_ALL = (UC_SIGMASK|UC_STACK|UC_MCONTEXT) _SIGQUEUE_MAX = 32 @@ -1021,14 +1021,14 @@ AT_TIMES = (AT_ATIME|AT_MTIME|AT_CTIME) AT_NOSET = (AT_NLINK|AT_RDEV|AT_FSID|AT_NODEID|AT_TYPE|\ AT_BLKSIZE|AT_NBLOCKS|AT_VCODE) -VSUID = 04000 -VSGID = 02000 -VSVTX = 01000 -VREAD = 00400 -VWRITE = 00200 -VEXEC = 00100 -MODEMASK = 07777 -PERMMASK = 00777 +VSUID = 0o4000 +VSGID = 0o2000 +VSVTX = 0o1000 +VREAD = 0o0400 +VWRITE = 0o0200 +VEXEC = 0o0100 +MODEMASK = 0o7777 +PERMMASK = 0o0777 def MANDMODE(mode): return (((mode) & (VSGID|(VEXEC>>3))) == VSGID) VSA_ACL = 0x0001 Modified: python/branches/cpy_merge/Lib/plat-sunos5/STROPTS.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-sunos5/STROPTS.py (original) +++ python/branches/cpy_merge/Lib/plat-sunos5/STROPTS.py Thu Jun 14 21:06:29 2007 @@ -94,7 +94,7 @@ NZERO = 20 NULL = 0 NULL = 0 -CMASK = 022 +CMASK = 0o22 CDLIMIT = (1<<11) NBPS = 0x20000 NBPSCTR = 512 @@ -730,13 +730,13 @@ _XRS_ID = 0x78727300 GETCONTEXT = 0 SETCONTEXT = 1 -UC_SIGMASK = 001 -UC_STACK = 002 -UC_CPU = 004 -UC_MAU = 010 +UC_SIGMASK = 0o01 +UC_STACK = 0o02 +UC_CPU = 0o04 +UC_MAU = 0o10 UC_FPU = UC_MAU -UC_INTR = 020 -UC_ASR = 040 +UC_INTR = 0o20 +UC_ASR = 0o40 UC_MCONTEXT = (UC_CPU|UC_FPU|UC_ASR) UC_ALL = (UC_SIGMASK|UC_STACK|UC_MCONTEXT) _SIGQUEUE_MAX = 32 @@ -1400,14 +1400,14 @@ AT_TIMES = (AT_ATIME|AT_MTIME|AT_CTIME) AT_NOSET = (AT_NLINK|AT_RDEV|AT_FSID|AT_NODEID|AT_TYPE|\ AT_BLKSIZE|AT_NBLOCKS|AT_VCODE) -VSUID = 04000 -VSGID = 02000 -VSVTX = 01000 -VREAD = 00400 -VWRITE = 00200 -VEXEC = 00100 -MODEMASK = 07777 -PERMMASK = 00777 +VSUID = 0o4000 +VSGID = 0o2000 +VSVTX = 0o1000 +VREAD = 0o0400 +VWRITE = 0o0200 +VEXEC = 0o0100 +MODEMASK = 0o7777 +PERMMASK = 0o0777 def MANDMODE(mode): return (((mode) & (VSGID|(VEXEC>>3))) == VSGID) VSA_ACL = 0x0001 Modified: python/branches/cpy_merge/Lib/plat-unixware7/IN.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-unixware7/IN.py (original) +++ python/branches/cpy_merge/Lib/plat-unixware7/IN.py Thu Jun 14 21:06:29 2007 @@ -187,8 +187,8 @@ NC_TPI_COTS_ORD = 3 NC_TPI_RAW = 4 NC_NOFLAG = 00 -NC_VISIBLE = 01 -NC_BROADCAST = 02 +NC_VISIBLE = 0o1 +NC_BROADCAST = 0o2 NC_NOPROTOFMLY = "-" NC_LOOPBACK = "loopback" NC_INET = "inet" Modified: python/branches/cpy_merge/Lib/plat-unixware7/STROPTS.py ============================================================================== --- python/branches/cpy_merge/Lib/plat-unixware7/STROPTS.py (original) +++ python/branches/cpy_merge/Lib/plat-unixware7/STROPTS.py Thu Jun 14 21:06:29 2007 @@ -65,41 +65,41 @@ ES_MACADTLID = 7 ES_PRVID = 8 ES_TPGETMAJOR = 9 -SA_EXEC = 001 -SA_WRITE = 002 -SA_READ = 004 -SA_SUBSIZE = 010 +SA_EXEC = 0o01 +SA_WRITE = 0o02 +SA_READ = 0o04 +SA_SUBSIZE = 0o10 # Included from sys/stropts_f.h X_STR = (ord('S')<<8) -X_I_BASE = (X_STR|0200) -X_I_NREAD = (X_STR|0201) -X_I_PUSH = (X_STR|0202) -X_I_POP = (X_STR|0203) -X_I_LOOK = (X_STR|0204) -X_I_FLUSH = (X_STR|0205) -X_I_SRDOPT = (X_STR|0206) -X_I_GRDOPT = (X_STR|0207) -X_I_STR = (X_STR|0210) -X_I_SETSIG = (X_STR|0211) -X_I_GETSIG = (X_STR|0212) -X_I_FIND = (X_STR|0213) -X_I_LINK = (X_STR|0214) -X_I_UNLINK = (X_STR|0215) -X_I_PEEK = (X_STR|0217) -X_I_FDINSERT = (X_STR|0220) -X_I_SENDFD = (X_STR|0221) -X_I_RECVFD = (X_STR|0222) +X_I_BASE = (X_STR|0o200) +X_I_NREAD = (X_STR|0o201) +X_I_PUSH = (X_STR|0o202) +X_I_POP = (X_STR|0o203) +X_I_LOOK = (X_STR|0o204) +X_I_FLUSH = (X_STR|0o205) +X_I_SRDOPT = (X_STR|0o206) +X_I_GRDOPT = (X_STR|0o207) +X_I_STR = (X_STR|0o210) +X_I_SETSIG = (X_STR|0o211) +X_I_GETSIG = (X_STR|0o212) +X_I_FIND = (X_STR|0o213) +X_I_LINK = (X_STR|0o214) +X_I_UNLINK = (X_STR|0o215) +X_I_PEEK = (X_STR|0o217) +X_I_FDINSERT = (X_STR|0o220) +X_I_SENDFD = (X_STR|0o221) +X_I_RECVFD = (X_STR|0o222) # Included from unistd.h # Included from sys/unistd.h -R_OK = 004 -W_OK = 002 -X_OK = 001 +R_OK = 0o04 +W_OK = 0o02 +X_OK = 0o01 F_OK = 000 -EFF_ONLY_OK = 010 -EX_OK = 020 +EFF_ONLY_OK = 0o10 +EX_OK = 0o20 SEEK_SET = 0 SEEK_CUR = 1 SEEK_END = 2 @@ -289,40 +289,40 @@ ANYMARK = 0x01 LASTMARK = 0x02 STR = (ord('S')<<8) -I_NREAD = (STR|01) -I_PUSH = (STR|02) -I_POP = (STR|03) -I_LOOK = (STR|04) -I_FLUSH = (STR|05) -I_SRDOPT = (STR|06) -I_GRDOPT = (STR|07) -I_STR = (STR|010) -I_SETSIG = (STR|011) -I_GETSIG = (STR|012) -I_FIND = (STR|013) -I_LINK = (STR|014) -I_UNLINK = (STR|015) -I_PEEK = (STR|017) -I_FDINSERT = (STR|020) -I_SENDFD = (STR|021) -I_RECVFD = (STR|022) -I_E_RECVFD = (STR|016) -I_RECVFD = (STR|016) -I_RECVFD = (STR|022) -I_SWROPT = (STR|023) -I_GWROPT = (STR|024) -I_LIST = (STR|025) -I_PLINK = (STR|026) -I_PUNLINK = (STR|027) -I_FLUSHBAND = (STR|034) -I_CKBAND = (STR|035) -I_GETBAND = (STR|036) -I_ATMARK = (STR|037) -I_SETCLTIME = (STR|040) -I_GETCLTIME = (STR|041) -I_CANPUT = (STR|042) -I_S_RECVFD = (STR|043) -I_STATS = (STR|044) -I_BIGPIPE = (STR|045) -I_GETTP = (STR|046) +I_NREAD = (STR|0o1) +I_PUSH = (STR|0o2) +I_POP = (STR|0o3) +I_LOOK = (STR|0o4) +I_FLUSH = (STR|0o5) +I_SRDOPT = (STR|0o6) +I_GRDOPT = (STR|0o7) +I_STR = (STR|0o10) +I_SETSIG = (STR|0o11) +I_GETSIG = (STR|0o12) +I_FIND = (STR|0o13) +I_LINK = (STR|0o14) +I_UNLINK = (STR|0o15) +I_PEEK = (STR|0o17) +I_FDINSERT = (STR|0o20) +I_SENDFD = (STR|0o21) +I_RECVFD = (STR|0o22) +I_E_RECVFD = (STR|0o16) +I_RECVFD = (STR|0o16) +I_RECVFD = (STR|0o22) +I_SWROPT = (STR|0o23) +I_GWROPT = (STR|0o24) +I_LIST = (STR|0o25) +I_PLINK = (STR|0o26) +I_PUNLINK = (STR|0o27) +I_FLUSHBAND = (STR|0o34) +I_CKBAND = (STR|0o35) +I_GETBAND = (STR|0o36) +I_ATMARK = (STR|0o37) +I_SETCLTIME = (STR|0o40) +I_GETCLTIME = (STR|0o41) +I_CANPUT = (STR|0o42) +I_S_RECVFD = (STR|0o43) +I_STATS = (STR|0o44) +I_BIGPIPE = (STR|0o45) +I_GETTP = (STR|0o46) INFTIM = -1 Modified: python/branches/cpy_merge/Lib/platform.py ============================================================================== --- python/branches/cpy_merge/Lib/platform.py (original) +++ python/branches/cpy_merge/Lib/platform.py Thu Jun 14 21:06:29 2007 @@ -242,7 +242,7 @@ _supported_dists = ('SuSE', 'debian', 'fedora', 'redhat', 'centos', 'mandrake', 'rocks', 'slackware', 'yellowdog', - 'gentoo', 'UnitedLinux') + 'gentoo', 'UnitedLinux', 'turbolinux') def _parse_release_file(firstline): @@ -600,6 +600,16 @@ release = '2003Server' else: release = 'post2003' + elif maj == 6: + if min == 0: + # Per http://msdn2.microsoft.com/en-us/library/ms724429.aspx + productType = GetVersionEx(1)[8] + if productType == 1: # VER_NT_WORKSTATION + release = 'Vista' + else: + release = '2008Server' + else: + release = 'post2008Server' else: if not release: # E.g. Win3.1 with win32s @@ -1064,6 +1074,16 @@ # (_syscmd_ver() tends to return the vendor name as well) if system == 'Microsoft Windows': system = 'Windows' + elif system == 'Microsoft' and release == 'Windows': + # Under Windows Vista and Windows Server 2008, + # Microsoft changed the output of the ver command. The + # release is no longer printed. This causes the + # system and release to be misidentified. + system = 'Windows' + if '6.0' == version[:3]: + release = 'Vista' + else: + release = '' # In case we still don't know anything useful, we'll try to # help ourselves Modified: python/branches/cpy_merge/Lib/pty.py ============================================================================== --- python/branches/cpy_merge/Lib/pty.py (original) +++ python/branches/cpy_merge/Lib/pty.py Thu Jun 14 21:06:29 2007 @@ -55,7 +55,7 @@ pass else: try: - tty_name, master_fd = sgi._getpty(os.O_RDWR, 0666, 0) + tty_name, master_fd = sgi._getpty(os.O_RDWR, 0o666, 0) except IOError as msg: raise os.error, msg return master_fd, tty_name Modified: python/branches/cpy_merge/Lib/pydoc.py ============================================================================== --- python/branches/cpy_merge/Lib/pydoc.py (original) +++ python/branches/cpy_merge/Lib/pydoc.py Thu Jun 14 21:06:29 2007 @@ -235,7 +235,7 @@ def __str__(self): exc = self.exc - if type(exc) is types.ClassType: + if isinstance(exc, type): exc = exc.__name__ return 'problem in %s - %s: %s' % (self.filename, exc, self.value) Modified: python/branches/cpy_merge/Lib/random.py ============================================================================== --- python/branches/cpy_merge/Lib/random.py (original) +++ python/branches/cpy_merge/Lib/random.py Thu Jun 14 21:06:29 2007 @@ -110,19 +110,19 @@ import time a = int(time.time() * 256) # use fractional seconds - super(Random, self).seed(a) + super().seed(a) self.gauss_next = None def getstate(self): """Return internal state; can be passed to setstate() later.""" - return self.VERSION, super(Random, self).getstate(), self.gauss_next + return self.VERSION, super().getstate(), self.gauss_next def setstate(self, state): """Restore internal state from object returned by getstate().""" version = state[0] if version == 2: version, internalstate, self.gauss_next = state - super(Random, self).setstate(internalstate) + super().setstate(internalstate) else: raise ValueError("state with version %s passed to " "Random.setstate() of version %s" % Modified: python/branches/cpy_merge/Lib/repr.py ============================================================================== --- python/branches/cpy_merge/Lib/repr.py (original) +++ python/branches/cpy_merge/Lib/repr.py Thu Jun 14 21:06:29 2007 @@ -47,7 +47,7 @@ return '%s%s%s' % (left, s, right) def repr_tuple(self, x, level): - return self._repr_iterable(x, level, '(', ')', self.maxlist, ',') + return self._repr_iterable(x, level, '(', ')', self.maxtuple, ',') def repr_list(self, x, level): return self._repr_iterable(x, level, '[', ']', self.maxlist) Modified: python/branches/cpy_merge/Lib/sqlite3/test/dbapi.py ============================================================================== --- python/branches/cpy_merge/Lib/sqlite3/test/dbapi.py (original) +++ python/branches/cpy_merge/Lib/sqlite3/test/dbapi.py Thu Jun 14 21:06:29 2007 @@ -40,12 +40,12 @@ sqlite.paramstyle) def CheckWarning(self): - self.assert_(issubclass(sqlite.Warning, StandardError), - "Warning is not a subclass of StandardError") + self.assert_(issubclass(sqlite.Warning, Exception), + "Warning is not a subclass of Exception") def CheckError(self): - self.failUnless(issubclass(sqlite.Error, StandardError), - "Error is not a subclass of StandardError") + self.failUnless(issubclass(sqlite.Error, Exception), + "Error is not a subclass of Exception") def CheckInterfaceError(self): self.failUnless(issubclass(sqlite.InterfaceError, sqlite.Error), Modified: python/branches/cpy_merge/Lib/sre_parse.py ============================================================================== --- python/branches/cpy_merge/Lib/sre_parse.py (original) +++ python/branches/cpy_merge/Lib/sre_parse.py Thu Jun 14 21:06:29 2007 @@ -101,7 +101,7 @@ self.width = None def dump(self, level=0): nl = 1 - seqtypes = type(()), type([]) + seqtypes = (tuple, list) for op, av in self.data: print(level*" " + op, end=' '); nl = 0 if op == "in": @@ -117,7 +117,7 @@ print(level*" " + "or") a.dump(level+1); nl = 1 i = i + 1 - elif type(av) in seqtypes: + elif isinstance(av, seqtypes): for a in av: if isinstance(a, SubPattern): if not nl: print() @@ -709,7 +709,7 @@ else: pappend((LITERAL, literal)) sep = source[:0] - if type(sep) is type(""): + if isinstance(sep, str): makechar = chr else: makechar = unichr Modified: python/branches/cpy_merge/Lib/stat.py ============================================================================== --- python/branches/cpy_merge/Lib/stat.py (original) +++ python/branches/cpy_merge/Lib/stat.py Thu Jun 14 21:06:29 2007 @@ -24,21 +24,21 @@ # Extract bits from the mode def S_IMODE(mode): - return mode & 07777 + return mode & 0o7777 def S_IFMT(mode): - return mode & 0170000 + return mode & 0o170000 # Constants used as S_IFMT() for various file types # (not all are implemented on all systems) -S_IFDIR = 0040000 -S_IFCHR = 0020000 -S_IFBLK = 0060000 -S_IFREG = 0100000 -S_IFIFO = 0010000 -S_IFLNK = 0120000 -S_IFSOCK = 0140000 +S_IFDIR = 0o040000 +S_IFCHR = 0o020000 +S_IFBLK = 0o060000 +S_IFREG = 0o100000 +S_IFIFO = 0o010000 +S_IFLNK = 0o120000 +S_IFSOCK = 0o140000 # Functions to test for each file type @@ -65,25 +65,25 @@ # Names for permission bits -S_ISUID = 04000 -S_ISGID = 02000 +S_ISUID = 0o4000 +S_ISGID = 0o2000 S_ENFMT = S_ISGID -S_ISVTX = 01000 -S_IREAD = 00400 -S_IWRITE = 00200 -S_IEXEC = 00100 -S_IRWXU = 00700 -S_IRUSR = 00400 -S_IWUSR = 00200 -S_IXUSR = 00100 -S_IRWXG = 00070 -S_IRGRP = 00040 -S_IWGRP = 00020 -S_IXGRP = 00010 -S_IRWXO = 00007 -S_IROTH = 00004 -S_IWOTH = 00002 -S_IXOTH = 00001 +S_ISVTX = 0o1000 +S_IREAD = 0o0400 +S_IWRITE = 0o0200 +S_IEXEC = 0o0100 +S_IRWXU = 0o0700 +S_IRUSR = 0o0400 +S_IWUSR = 0o0200 +S_IXUSR = 0o0100 +S_IRWXG = 0o0070 +S_IRGRP = 0o0040 +S_IWGRP = 0o0020 +S_IXGRP = 0o0010 +S_IRWXO = 0o0007 +S_IROTH = 0o0004 +S_IWOTH = 0o0002 +S_IXOTH = 0o0001 # Names for file flags Modified: python/branches/cpy_merge/Lib/string.py ============================================================================== --- python/branches/cpy_merge/Lib/string.py (original) +++ python/branches/cpy_merge/Lib/string.py Thu Jun 14 21:06:29 2007 @@ -103,7 +103,7 @@ """ def __init__(cls, name, bases, dct): - super(_TemplateMetaclass, cls).__init__(name, bases, dct) + super().__init__(name, bases, dct) if 'pattern' in dct: pattern = cls.pattern else: Modified: python/branches/cpy_merge/Lib/subprocess.py ============================================================================== --- python/branches/cpy_merge/Lib/subprocess.py (original) +++ python/branches/cpy_merge/Lib/subprocess.py Thu Jun 14 21:06:29 2007 @@ -287,7 +287,6 @@ mswindows = (sys.platform == "win32") import os -import types import traceback # Exception classes used by this module. @@ -694,7 +693,7 @@ errread, errwrite): """Execute program (MS Windows version)""" - if not isinstance(args, types.StringTypes): + if not isinstance(args, basestring): args = list2cmdline(args) # Process startup details @@ -909,7 +908,7 @@ errread, errwrite): """Execute program (POSIX version)""" - if isinstance(args, types.StringTypes): + if isinstance(args, basestring): args = [args] else: args = list(args) Modified: python/branches/cpy_merge/Lib/tarfile.py ============================================================================== --- python/branches/cpy_merge/Lib/tarfile.py (original) +++ python/branches/cpy_merge/Lib/tarfile.py Thu Jun 14 21:06:29 2007 @@ -141,26 +141,26 @@ #--------------------------------------------------------- # Bits used in the mode field, values in octal. #--------------------------------------------------------- -S_IFLNK = 0120000 # symbolic link -S_IFREG = 0100000 # regular file -S_IFBLK = 0060000 # block device -S_IFDIR = 0040000 # directory -S_IFCHR = 0020000 # character device -S_IFIFO = 0010000 # fifo - -TSUID = 04000 # set UID on execution -TSGID = 02000 # set GID on execution -TSVTX = 01000 # reserved - -TUREAD = 0400 # read by owner -TUWRITE = 0200 # write by owner -TUEXEC = 0100 # execute/search by owner -TGREAD = 0040 # read by group -TGWRITE = 0020 # write by group -TGEXEC = 0010 # execute/search by group -TOREAD = 0004 # read by other -TOWRITE = 0002 # write by other -TOEXEC = 0001 # execute/search by other +S_IFLNK = 0o120000 # symbolic link +S_IFREG = 0o100000 # regular file +S_IFBLK = 0o060000 # block device +S_IFDIR = 0o040000 # directory +S_IFCHR = 0o020000 # character device +S_IFIFO = 0o010000 # fifo + +TSUID = 0o4000 # set UID on execution +TSGID = 0o2000 # set GID on execution +TSVTX = 0o1000 # reserved + +TUREAD = 0o400 # read by owner +TUWRITE = 0o200 # write by owner +TUEXEC = 0o100 # execute/search by owner +TGREAD = 0o040 # read by group +TGWRITE = 0o020 # write by group +TGEXEC = 0o010 # execute/search by group +TOREAD = 0o004 # read by other +TOWRITE = 0o002 # write by other +TOEXEC = 0o001 # execute/search by other #--------------------------------------------------------- # initialization @@ -192,7 +192,7 @@ """ # There are two possible encodings for a number field, see # itn() below. - if s[0] != chr(0200): + if s[0] != chr(0o200): try: n = int(nts(s) or "0", 8) except ValueError: @@ -210,7 +210,7 @@ # POSIX 1003.1-1988 requires numbers to be encoded as a string of # octal digits followed by a null-byte, this allows values up to # (8**(digits-1))-1. GNU tar allows storing numbers greater than - # that if necessary. A leading 0200 byte indicates this particular + # that if necessary. A leading 0o200 byte indicates this particular # encoding, the following digits-1 bytes are a big-endian # representation. This allows values up to (256**(digits-1))-1. if 0 <= n < 8 ** (digits - 1): @@ -226,9 +226,9 @@ s = "" for i in range(digits - 1): - s = chr(n & 0377) + s + s = chr(n & 0o377) + s n >>= 8 - s = chr(0200) + s + s = chr(0o200) + s return s def uts(s, encoding, errors): @@ -920,7 +920,7 @@ of the member. """ self.name = name # member name - self.mode = 0644 # file permissions + self.mode = 0o644 # file permissions self.uid = 0 # user id self.gid = 0 # group id self.size = 0 # file size @@ -960,7 +960,7 @@ """ info = { "name": normpath(self.name), - "mode": self.mode & 07777, + "mode": self.mode & 0o7777, "uid": self.uid, "gid": self.gid, "size": self.size, @@ -1103,7 +1103,7 @@ """ parts = [ stn(info.get("name", ""), 100), - itn(info.get("mode", 0) & 07777, 8, format), + itn(info.get("mode", 0) & 0o7777, 8, format), itn(info.get("uid", 0), 8, format), itn(info.get("gid", 0), 8, format), itn(info.get("size", 0), 12, format), @@ -2019,7 +2019,7 @@ # Extract directory with a safe mode, so that # all files below can be extracted as well. try: - os.makedirs(os.path.join(path, tarinfo.name), 0700) + os.makedirs(os.path.join(path, tarinfo.name), 0o700) except EnvironmentError: pass directories.append(tarinfo) Modified: python/branches/cpy_merge/Lib/tempfile.py ============================================================================== --- python/branches/cpy_merge/Lib/tempfile.py (original) +++ python/branches/cpy_merge/Lib/tempfile.py Thu Jun 14 21:06:29 2007 @@ -200,7 +200,7 @@ name = next(namer) filename = _os.path.join(dir, name) try: - fd = _os.open(filename, flags, 0600) + fd = _os.open(filename, flags, 0o600) fp = _os.fdopen(fd, 'w') fp.write('blat') fp.close() @@ -239,7 +239,7 @@ name = next(names) file = _os.path.join(dir, pre + name + suf) try: - fd = _os.open(file, flags, 0600) + fd = _os.open(file, flags, 0o600) _set_cloexec(fd) return (fd, _os.path.abspath(file)) except OSError as e: @@ -331,7 +331,7 @@ name = next(names) file = _os.path.join(dir, prefix + name + suffix) try: - _os.mkdir(file, 0700) + _os.mkdir(file, 0o700) return file except OSError as e: if e.errno == _errno.EEXIST: Modified: python/branches/cpy_merge/Lib/test/exception_hierarchy.txt ============================================================================== --- python/branches/cpy_merge/Lib/test/exception_hierarchy.txt (original) +++ python/branches/cpy_merge/Lib/test/exception_hierarchy.txt Thu Jun 14 21:06:29 2007 @@ -4,39 +4,38 @@ +-- Exception +-- GeneratorExit +-- StopIteration - +-- StandardError - | +-- ArithmeticError - | | +-- FloatingPointError - | | +-- OverflowError - | | +-- ZeroDivisionError - | +-- AssertionError - | +-- AttributeError - | +-- EnvironmentError - | | +-- IOError - | | +-- OSError - | | +-- WindowsError (Windows) - | | +-- VMSError (VMS) - | +-- EOFError - | +-- ImportError - | +-- LookupError - | | +-- IndexError - | | +-- KeyError - | +-- MemoryError - | +-- NameError - | | +-- UnboundLocalError - | +-- ReferenceError - | +-- RuntimeError - | | +-- NotImplementedError - | +-- SyntaxError - | | +-- IndentationError - | | +-- TabError - | +-- SystemError - | +-- TypeError - | +-- ValueError - | | +-- UnicodeError - | | +-- UnicodeDecodeError - | | +-- UnicodeEncodeError - | | +-- UnicodeTranslateError + +-- ArithmeticError + | +-- FloatingPointError + | +-- OverflowError + | +-- ZeroDivisionError + +-- AssertionError + +-- AttributeError + +-- EnvironmentError + | +-- IOError + | +-- OSError + | +-- WindowsError (Windows) + | +-- VMSError (VMS) + +-- EOFError + +-- ImportError + +-- LookupError + | +-- IndexError + | +-- KeyError + +-- MemoryError + +-- NameError + | +-- UnboundLocalError + +-- ReferenceError + +-- RuntimeError + | +-- NotImplementedError + +-- SyntaxError + | +-- IndentationError + | +-- TabError + +-- SystemError + +-- TypeError + +-- ValueError + | +-- UnicodeError + | +-- UnicodeDecodeError + | +-- UnicodeEncodeError + | +-- UnicodeTranslateError +-- Warning +-- DeprecationWarning +-- PendingDeprecationWarning Modified: python/branches/cpy_merge/Lib/test/list_tests.py ============================================================================== --- python/branches/cpy_merge/Lib/test/list_tests.py (original) +++ python/branches/cpy_merge/Lib/test/list_tests.py Thu Jun 14 21:06:29 2007 @@ -451,7 +451,7 @@ self.assertEqual(u, list("ham")) def test_iadd(self): - super(CommonTest, self).test_iadd() + super().test_iadd() u = self.type2test([0, 1]) u2 = u u += [2, 3] Modified: python/branches/cpy_merge/Lib/test/output/test_class ============================================================================== --- python/branches/cpy_merge/Lib/test/output/test_class (original) +++ python/branches/cpy_merge/Lib/test/output/test_class Thu Jun 14 21:06:29 2007 @@ -46,8 +46,7 @@ __int__: () __int__: () __float__: () -__oct__: () -__hex__: () +__index__: () __hash__: () __repr__: () __str__: () Modified: python/branches/cpy_merge/Lib/test/output/test_tokenize ============================================================================== --- python/branches/cpy_merge/Lib/test/output/test_tokenize (original) +++ python/branches/cpy_merge/Lib/test/output/test_tokenize Thu Jun 14 21:06:29 2007 @@ -124,66 +124,80 @@ 39,5-39,7: OP '!=' 39,8-39,11: NUMBER '255' 39,11-39,12: NEWLINE '\n' -40,0-40,4: NUMBER '0377' -40,5-40,7: OP '!=' -40,8-40,11: NUMBER '255' -40,11-40,12: NEWLINE '\n' +40,0-40,5: NUMBER '0o377' +40,6-40,8: OP '!=' +40,9-40,12: NUMBER '255' +40,12-40,13: NEWLINE '\n' 41,0-41,10: NUMBER '2147483647' 41,13-41,15: OP '!=' -41,16-41,28: NUMBER '017777777777' -41,28-41,29: NEWLINE '\n' +41,16-41,29: NUMBER '0o17777777777' +41,29-41,30: NEWLINE '\n' 42,0-42,1: OP '-' 42,1-42,11: NUMBER '2147483647' 42,11-42,12: OP '-' 42,12-42,13: NUMBER '1' 42,14-42,16: OP '!=' -42,17-42,29: NUMBER '020000000000' -42,29-42,30: NEWLINE '\n' -43,0-43,12: NUMBER '037777777777' -43,13-43,15: OP '!=' -43,16-43,17: OP '-' -43,17-43,18: NUMBER '1' -43,18-43,19: NEWLINE '\n' +42,17-42,30: NUMBER '0o20000000000' +42,30-42,31: NEWLINE '\n' +43,0-43,13: NUMBER '0o37777777777' +43,14-43,16: OP '!=' +43,17-43,18: OP '-' +43,18-43,19: NUMBER '1' +43,19-43,20: NEWLINE '\n' 44,0-44,10: NUMBER '0xffffffff' 44,11-44,13: OP '!=' 44,14-44,15: OP '-' 44,15-44,16: NUMBER '1' -44,16-44,17: NEWLINE '\n' +44,16-44,17: OP ';' +44,18-44,31: NUMBER '0o37777777777' +44,32-44,34: OP '!=' +44,35-44,36: OP '-' +44,36-44,37: NUMBER '1' +44,37-44,38: OP ';' +44,39-44,40: OP '-' +44,40-44,49: NUMBER '0o1234567' +44,50-44,52: OP '==' +44,53-44,64: NUMBER '0O001234567' +44,64-44,65: OP ';' +44,66-44,73: NUMBER '0b10101' +44,74-44,76: OP '==' +44,77-44,87: NUMBER '0B00010101' +44,87-44,88: NEWLINE '\n' 45,0-45,1: NL '\n' 46,0-46,15: COMMENT '# Long integers' 46,15-46,16: NL '\n' 47,0-47,1: NAME 'x' 47,2-47,3: OP '=' -47,4-47,6: NUMBER '0L' -47,6-47,7: NEWLINE '\n' +47,4-47,5: NUMBER '0' +47,5-47,6: NEWLINE '\n' 48,0-48,1: NAME 'x' 48,2-48,3: OP '=' -48,4-48,6: NUMBER '0l' -48,6-48,7: NEWLINE '\n' +48,4-48,5: NUMBER '0' +48,5-48,6: NEWLINE '\n' 49,0-49,1: NAME 'x' 49,2-49,3: OP '=' -49,4-49,23: NUMBER '0xffffffffffffffffL' -49,23-49,24: NEWLINE '\n' +49,4-49,22: NUMBER '0xffffffffffffffff' +49,22-49,23: NEWLINE '\n' 50,0-50,1: NAME 'x' 50,2-50,3: OP '=' -50,4-50,23: NUMBER '0xffffffffffffffffl' -50,23-50,24: NEWLINE '\n' +50,4-50,22: NUMBER '0xffffffffffffffff' +50,22-50,23: NEWLINE '\n' 51,0-51,1: NAME 'x' 51,2-51,3: OP '=' -51,4-51,23: NUMBER '077777777777777777L' +51,4-51,23: NUMBER '0o77777777777777777' 51,23-51,24: NEWLINE '\n' 52,0-52,1: NAME 'x' 52,2-52,3: OP '=' -52,4-52,23: NUMBER '077777777777777777l' +52,4-52,23: NUMBER '0B11101010111111111' 52,23-52,24: NEWLINE '\n' 53,0-53,1: NAME 'x' 53,2-53,3: OP '=' -53,4-53,35: NUMBER '123456789012345678901234567890L' -53,35-53,36: NEWLINE '\n' +53,4-53,34: NUMBER '123456789012345678901234567890' +53,34-53,35: NEWLINE '\n' 54,0-54,1: NAME 'x' 54,2-54,3: OP '=' -54,4-54,35: NUMBER '123456789012345678901234567890l' -54,35-54,36: NEWLINE '\n' +54,4-54,34: NUMBER '123456789012345678901234567890' +54,34-54,35: NEWLINE '\n' 55,0-55,1: NL '\n' 56,0-56,24: COMMENT '# Floating-point numbers' 56,24-56,25: NL '\n' Modified: python/branches/cpy_merge/Lib/test/regrtest.py ============================================================================== --- python/branches/cpy_merge/Lib/test/regrtest.py (original) +++ python/branches/cpy_merge/Lib/test/regrtest.py Thu Jun 14 21:06:29 2007 @@ -697,7 +697,7 @@ import gc, copy_reg import _strptime, linecache, dircache import urlparse, urllib, urllib2, mimetypes, doctest - import struct, filecmp + import struct, filecmp, collections from distutils.dir_util import _path_created # Restore some original values. @@ -707,6 +707,10 @@ sys.path_importer_cache.clear() sys.path_importer_cache.update(pic) + # Clear ABC registries. + for obj in [collections.Hashable, collections.Iterable]: + obj._ABCMeta__registry.clear() + # Clear assorted module caches. _path_created.clear() re.purge() Modified: python/branches/cpy_merge/Lib/test/string_tests.py ============================================================================== --- python/branches/cpy_merge/Lib/test/string_tests.py (original) +++ python/branches/cpy_merge/Lib/test/string_tests.py Thu Jun 14 21:06:29 2007 @@ -211,6 +211,32 @@ self.checkraises(TypeError, 'hello', 'rindex') self.checkraises(TypeError, 'hello', 'rindex', 42) + def test_lower(self): + self.checkequal('hello', 'HeLLo', 'lower') + self.checkequal('hello', 'hello', 'lower') + self.checkraises(TypeError, 'hello', 'lower', 42) + + def test_upper(self): + self.checkequal('HELLO', 'HeLLo', 'upper') + self.checkequal('HELLO', 'HELLO', 'upper') + self.checkraises(TypeError, 'hello', 'upper', 42) + + def test_expandtabs(self): + self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs') + self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs', 8) + self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs', 4) + self.checkequal('abc\r\nab def\ng hi', 'abc\r\nab\tdef\ng\thi', 'expandtabs', 4) + self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs') + self.checkequal('abc\rab def\ng hi', 'abc\rab\tdef\ng\thi', 'expandtabs', 8) + self.checkequal('abc\r\nab\r\ndef\ng\r\nhi', 'abc\r\nab\r\ndef\ng\r\nhi', 'expandtabs', 4) + self.checkequal(' a\n b', ' \ta\n\tb', 'expandtabs', 1) + + self.checkraises(TypeError, 'hello', 'expandtabs', 42, 42) + # This test is only valid when sizeof(int) == sizeof(void*) == 4. + if sys.maxint < (1 << 32) and struct.calcsize('P') == 4: + self.checkraises(OverflowError, + '\ta\n\tb', 'expandtabs', sys.maxint) + def test_split(self): # by a char self.checkequal(['a', 'b', 'c', 'd'], 'a|b|c|d', 'split', '|') Modified: python/branches/cpy_merge/Lib/test/test_array.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_array.py (original) +++ python/branches/cpy_merge/Lib/test/test_array.py Thu Jun 14 21:06:29 2007 @@ -710,7 +710,7 @@ class StringTest(BaseTest): def test_setitem(self): - super(StringTest, self).test_setitem() + super().test_setitem() a = array.array(self.typecode, self.example) self.assertRaises(TypeError, a.__setitem__, 0, self.example[:2]) Modified: python/branches/cpy_merge/Lib/test/test_builtin.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_builtin.py (original) +++ python/branches/cpy_merge/Lib/test/test_builtin.py Thu Jun 14 21:06:29 2007 @@ -795,8 +795,27 @@ self.assertRaises(TypeError, int, 1, 12) - self.assertEqual(int('0123', 0), 83) + # tests with base 0 + self.assertRaises(ValueError, int, ' 0123 ', 0) # old octal syntax + self.assertEqual(int('000', 0), 0) + self.assertEqual(int('0o123', 0), 83) + self.assertEqual(int('0x123', 0), 291) + self.assertEqual(int('0b100', 0), 4) + self.assertEqual(int(' 0O123 ', 0), 83) + self.assertEqual(int(' 0X123 ', 0), 291) + self.assertEqual(int(' 0B100 ', 0), 4) + + # without base still base 10 + self.assertEqual(int('0123'), 123) + self.assertEqual(int('0123', 10), 123) + + # tests with prefix and base != 0 self.assertEqual(int('0x123', 16), 291) + self.assertEqual(int('0o123', 8), 83) + self.assertEqual(int('0b100', 2), 4) + self.assertEqual(int('0X123', 16), 291) + self.assertEqual(int('0O123', 8), 83) + self.assertEqual(int('0B100', 2), 4) # SF bug 1334662: int(string, base) wrong answers # Various representations of 2**32 evaluated to 0 @@ -1348,10 +1367,10 @@ self.assertEquals(next(it, 42), 42) def test_oct(self): - self.assertEqual(oct(100), '0144') - self.assertEqual(oct(100), '0144') - self.assertEqual(oct(-100), '-0144') - self.assertEqual(oct(-100), '-0144') + self.assertEqual(oct(100), '0o144') + self.assertEqual(oct(100), '0o144') + self.assertEqual(oct(-100), '-0o144') + self.assertEqual(oct(-100), '-0o144') self.assertRaises(TypeError, oct, ()) def write_testfile(self): Modified: python/branches/cpy_merge/Lib/test/test_bytes.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_bytes.py (original) +++ python/branches/cpy_merge/Lib/test/test_bytes.py Thu Jun 14 21:06:29 2007 @@ -709,6 +709,12 @@ pass def test_find(self): pass + def test_expandtabs(self): + pass + def test_upper(self): + pass + def test_lower(self): + pass def test_main(): Modified: python/branches/cpy_merge/Lib/test/test_cgi.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_cgi.py (original) +++ python/branches/cpy_merge/Lib/test/test_cgi.py Thu Jun 14 21:06:29 2007 @@ -50,7 +50,7 @@ raise ValueError, "unknown method: %s" % method try: return cgi.parse(fp, env, strict_parsing=1) - except StandardError as err: + except Exception as err: return ComparableException(err) # A list of test cases. Each test case is a a two-tuple that contains Modified: python/branches/cpy_merge/Lib/test/test_class.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_class.py (original) +++ python/branches/cpy_merge/Lib/test/test_class.py Thu Jun 14 21:06:29 2007 @@ -80,18 +80,14 @@ print("__int__:", args) return 1 + def __index__(self, *args): + print("__index__:", args) + return 1 + def __float__(self, *args): print("__float__:", args) return 1.0 - def __oct__(self, *args): - print("__oct__:", args) - return '01' - - def __hex__(self, *args): - print("__hex__:", args) - return '0x1' - def __cmp__(self, *args): print("__cmp__:", args) return 0 @@ -237,7 +233,6 @@ int(testme) float(testme) oct(testme) -hex(testme) # And the rest... @@ -287,8 +282,6 @@ __float__ = __int__ __str__ = __int__ __repr__ = __int__ - __oct__ = __int__ - __hex__ = __int__ def check_exc(stmt, exception): """Raise TestFailed if executing 'stmt' does not raise 'exception' Modified: python/branches/cpy_merge/Lib/test/test_collections.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_collections.py (original) +++ python/branches/cpy_merge/Lib/test/test_collections.py Thu Jun 14 21:06:29 2007 @@ -1,6 +1,14 @@ +"""Unit tests for collections.py.""" + import unittest from test import test_support from collections import NamedTuple +from collections import Hashable, Iterable, Iterator +from collections import Sized, Container, Callable +from collections import Set, MutableSet +from collections import Mapping, MutableMapping +from collections import Sequence, MutableSequence + class TestNamedTuple(unittest.TestCase): @@ -51,11 +59,187 @@ self.assertRaises(AttributeError, eval, 'p.z', locals()) +class TestOneTrickPonyABCs(unittest.TestCase): + + def test_Hashable(self): + # Check some non-hashables + non_samples = [bytes(), list(), set(), dict()] + for x in non_samples: + self.failIf(isinstance(x, Hashable), repr(x)) + self.failIf(issubclass(type(x), Hashable), repr(type(x))) + # Check some hashables + samples = [None, + int(), float(), complex(), + str(), unicode(), + tuple(), frozenset(), + int, list, object, type, + ] + for x in samples: + self.failUnless(isinstance(x, Hashable), repr(x)) + self.failUnless(issubclass(type(x), Hashable), repr(type(x))) + self.assertRaises(TypeError, Hashable) + # Check direct subclassing + class H(Hashable): + def __hash__(self): + return super().__hash__() + self.assertEqual(hash(H()), 0) + self.failIf(issubclass(int, H)) + + def test_Iterable(self): + # Check some non-iterables + non_samples = [None, 42, 3.14, 1j] + for x in non_samples: + self.failIf(isinstance(x, Iterable), repr(x)) + self.failIf(issubclass(type(x), Iterable), repr(type(x))) + # Check some iterables + samples = [bytes(), str(), unicode(), + tuple(), list(), set(), frozenset(), dict(), + dict().keys(), dict().items(), dict().values(), + (lambda: (yield))(), + (x for x in []), + ] + for x in samples: + self.failUnless(isinstance(x, Iterable), repr(x)) + self.failUnless(issubclass(type(x), Iterable), repr(type(x))) + # Check direct subclassing + class I(Iterable): + def __iter__(self): + return super().__iter__() + self.assertEqual(list(I()), []) + self.failIf(issubclass(str, I)) + + def test_Iterator(self): + non_samples = [None, 42, 3.14, 1j, b"", "", u"", (), [], {}, set()] + for x in non_samples: + self.failIf(isinstance(x, Iterator), repr(x)) + self.failIf(issubclass(type(x), Iterator), repr(type(x))) + samples = [iter(bytes()), iter(str()), iter(unicode()), + iter(tuple()), iter(list()), iter(dict()), + iter(set()), iter(frozenset()), + iter(dict().keys()), iter(dict().items()), + iter(dict().values()), + (lambda: (yield))(), + (x for x in []), + ] + for x in samples: + self.failUnless(isinstance(x, Iterator), repr(x)) + self.failUnless(issubclass(type(x), Iterator), repr(type(x))) + + def test_Sized(self): + non_samples = [None, 42, 3.14, 1j, + (lambda: (yield))(), + (x for x in []), + ] + for x in non_samples: + self.failIf(isinstance(x, Sized), repr(x)) + self.failIf(issubclass(type(x), Sized), repr(type(x))) + samples = [bytes(), str(), unicode(), + tuple(), list(), set(), frozenset(), dict(), + dict().keys(), dict().items(), dict().values(), + ] + for x in samples: + self.failUnless(isinstance(x, Sized), repr(x)) + self.failUnless(issubclass(type(x), Sized), repr(type(x))) + + def test_Container(self): + non_samples = [None, 42, 3.14, 1j, + (lambda: (yield))(), + (x for x in []), + ] + for x in non_samples: + self.failIf(isinstance(x, Container), repr(x)) + self.failIf(issubclass(type(x), Container), repr(type(x))) + samples = [bytes(), str(), unicode(), + tuple(), list(), set(), frozenset(), dict(), + dict().keys(), dict().items(), + ] + for x in samples: + self.failUnless(isinstance(x, Container), repr(x)) + self.failUnless(issubclass(type(x), Container), repr(type(x))) + + def test_Callable(self): + non_samples = [None, 42, 3.14, 1j, + "", b"", (), [], {}, set(), + (lambda: (yield))(), + (x for x in []), + ] + for x in non_samples: + self.failIf(isinstance(x, Callable), repr(x)) + self.failIf(issubclass(type(x), Callable), repr(type(x))) + samples = [lambda: None, + type, int, object, + len, + list.append, [].append, + ] + for x in samples: + self.failUnless(isinstance(x, Callable), repr(x)) + self.failUnless(issubclass(type(x), Callable), repr(type(x))) + + def test_direct_subclassing(self): + for B in Hashable, Iterable, Iterator, Sized, Container, Callable: + class C(B): + pass + self.failUnless(issubclass(C, B)) + self.failIf(issubclass(int, C)) + + def test_registration(self): + for B in Hashable, Iterable, Iterator, Sized, Container, Callable: + class C: + __hash__ = None # Make sure it isn't hashable by default + self.failIf(issubclass(C, B), B.__name__) + B.register(C) + self.failUnless(issubclass(C, B)) + + +class TestCollectionABCs(unittest.TestCase): + + # XXX For now, we only test some virtual inheritance properties. + # We should also test the proper behavior of the collection ABCs + # as real base classes or mix-in classes. + + def test_Set(self): + for sample in [set, frozenset]: + self.failUnless(isinstance(sample(), Set)) + self.failUnless(issubclass(sample, Set)) + + def test_MutableSet(self): + self.failUnless(isinstance(set(), MutableSet)) + self.failUnless(issubclass(set, MutableSet)) + self.failIf(isinstance(frozenset(), MutableSet)) + self.failIf(issubclass(frozenset, MutableSet)) + + def test_Mapping(self): + for sample in [dict]: + self.failUnless(isinstance(sample(), Mapping)) + self.failUnless(issubclass(sample, Mapping)) + + def test_MutableMapping(self): + for sample in [dict]: + self.failUnless(isinstance(sample(), MutableMapping)) + self.failUnless(issubclass(sample, MutableMapping)) + + def test_Sequence(self): + for sample in [tuple, list, bytes, str]: + self.failUnless(isinstance(sample(), Sequence)) + self.failUnless(issubclass(sample, Sequence)) + self.failUnless(issubclass(basestring, Sequence)) + + def test_MutableSequence(self): + for sample in [tuple, str]: + self.failIf(isinstance(sample(), MutableSequence)) + self.failIf(issubclass(sample, MutableSequence)) + for sample in [list, bytes]: + self.failUnless(isinstance(sample(), MutableSequence)) + self.failUnless(issubclass(sample, MutableSequence)) + self.failIf(issubclass(basestring, MutableSequence)) + + def test_main(verbose=None): import collections as CollectionsModule - test_classes = [TestNamedTuple] + test_classes = [TestNamedTuple, TestOneTrickPonyABCs, TestCollectionABCs] test_support.run_unittest(*test_classes) test_support.run_doctest(CollectionsModule, verbose) + if __name__ == "__main__": test_main(verbose=True) Modified: python/branches/cpy_merge/Lib/test/test_compile.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_compile.py (original) +++ python/branches/cpy_merge/Lib/test/test_compile.py Thu Jun 14 21:06:29 2007 @@ -36,6 +36,9 @@ def test_syntax_error(self): self.assertRaises(SyntaxError, compile, "1+*3", "filename", "exec") + def test_none_keyword_arg(self): + self.assertRaises(SyntaxError, compile, "f(None=1)", "", "exec") + def test_duplicate_global_local(self): try: exec('def f(a): global a; a = 1') @@ -158,21 +161,22 @@ def test_literals_with_leading_zeroes(self): for arg in ["077787", "0xj", "0x.", "0e", "090000000000000", - "080000000000000", "000000000000009", "000000000000008"]: + "080000000000000", "000000000000009", "000000000000008", + "0b42", "0BADCAFE", "0o123456789", "0b1.1", "0o4.2", + "0b101j2", "0o153j2", "0b100e1", "0o777e1", "0777", + "000777", "000000000000007"]: self.assertRaises(SyntaxError, eval, arg) - self.assertEqual(eval("0777"), 511) - self.assertEqual(eval("000777"), 511) self.assertEqual(eval("0xff"), 255) - self.assertEqual(eval("0XfF"), 255) self.assertEqual(eval("0777."), 777) self.assertEqual(eval("0777.0"), 777) self.assertEqual(eval("000000000000000000000000000000000000000000000000000777e0"), 777) self.assertEqual(eval("0777e1"), 7770) self.assertEqual(eval("0e0"), 0) - self.assertEqual(eval("0000E-012"), 0) + self.assertEqual(eval("0000e-012"), 0) self.assertEqual(eval("09.5"), 9.5) self.assertEqual(eval("0777j"), 777j) + self.assertEqual(eval("000"), 0) self.assertEqual(eval("00j"), 0j) self.assertEqual(eval("00.0"), 0) self.assertEqual(eval("0e3"), 0) @@ -181,9 +185,12 @@ self.assertEqual(eval("090000000000000e0"), 90000000000000.) self.assertEqual(eval("090000000000000e-0"), 90000000000000.) self.assertEqual(eval("090000000000000j"), 90000000000000j) - self.assertEqual(eval("000000000000007"), 7) self.assertEqual(eval("000000000000008."), 8.) self.assertEqual(eval("000000000000009."), 9.) + self.assertEqual(eval("0b101010"), 42) + self.assertEqual(eval("-0b000000000010"), -2) + self.assertEqual(eval("0o777"), 511) + self.assertEqual(eval("-0o0000010"), -8) def test_unary_minus(self): # Verify treatment of unary minus on negative numbers SF bug #660455 Modified: python/branches/cpy_merge/Lib/test/test_descr.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_descr.py (original) +++ python/branches/cpy_merge/Lib/test/test_descr.py Thu Jun 14 21:06:29 2007 @@ -2124,17 +2124,14 @@ class octlong(int): __slots__ = [] def __str__(self): - s = oct(self) - if s[-1] == 'L': - s = s[:-1] - return s + return oct(self) def __add__(self, other): return self.__class__(super(octlong, self).__add__(other)) __radd__ = __add__ - vereq(str(octlong(3) + 5), "010") + vereq(str(octlong(3) + 5), "0o10") # (Note that overriding __radd__ here only seems to work # because the example uses a short int left argument.) - vereq(str(5 + octlong(3000)), "05675") + vereq(str(5 + octlong(3000)), "0o5675") a = octlong(12345) vereq(a, 12345) vereq(int(a), 12345) @@ -4103,7 +4100,8 @@ N1 = sys.maxint + 1 # might trigger OverflowErrors instead of TypeErrors N2 = sys.maxint # if sizeof(int) < sizeof(long), might trigger # ValueErrors instead of TypeErrors - for metaclass in [type, types.ClassType]: + if 1: + metaclass = type for name, expr, iexpr in [ ('__add__', 'x + y', 'x += y'), ('__sub__', 'x - y', 'x -= y'), Modified: python/branches/cpy_merge/Lib/test/test_dumbdbm.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_dumbdbm.py (original) +++ python/branches/cpy_merge/Lib/test/test_dumbdbm.py Thu Jun 14 21:06:29 2007 @@ -44,17 +44,17 @@ return try: - old_umask = os.umask(0002) - f = dumbdbm.open(_fname, 'c', 0637) + old_umask = os.umask(0o002) + f = dumbdbm.open(_fname, 'c', 0o637) f.close() finally: os.umask(old_umask) - expected_mode = 0635 + expected_mode = 0o635 if os.name != 'posix': # Windows only supports setting the read-only attribute. # This shouldn't fail, but doesn't work like Unix either. - expected_mode = 0666 + expected_mode = 0o666 import stat st = os.stat(_fname + '.dat') Modified: python/branches/cpy_merge/Lib/test/test_format.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_format.py (original) +++ python/branches/cpy_merge/Lib/test/test_format.py Thu Jun 14 21:06:29 2007 @@ -122,7 +122,7 @@ # same, except no 0 flag testboth("%#+27.23X", big, " +0X001234567890ABCDEF12345") -big = 012345670123456701234567012345670 # 32 octal digits +big = 0o12345670123456701234567012345670 # 32 octal digits testboth("%o", big, "12345670123456701234567012345670") testboth("%o", -big, "-12345670123456701234567012345670") testboth("%5o", -big, "-12345670123456701234567012345670") @@ -142,25 +142,26 @@ testboth("%34.33o", big, " 012345670123456701234567012345670") testboth("%-34.33o", big, "012345670123456701234567012345670 ") testboth("%o", big, "12345670123456701234567012345670") -testboth("%#o", big, "012345670123456701234567012345670") -testboth("%#o", -big, "-012345670123456701234567012345670") -testboth("%#.34o", -big, "-0012345670123456701234567012345670") -testboth("%#+.34o", big, "+0012345670123456701234567012345670") -testboth("%# .34o", big, " 0012345670123456701234567012345670") -testboth("%#+.34o", big, "+0012345670123456701234567012345670") -testboth("%#-+.34o", big, "+0012345670123456701234567012345670") -testboth("%#-+37.34o", big, "+0012345670123456701234567012345670 ") -testboth("%#+37.34o", big, " +0012345670123456701234567012345670") +testboth("%#o", big, "0o12345670123456701234567012345670") +testboth("%#o", -big, "-0o12345670123456701234567012345670") +testboth("%#.34o", -big, "-0o0012345670123456701234567012345670") +testboth("%#+.34o", big, "+0o0012345670123456701234567012345670") +testboth("%# .34o", big, " 0o0012345670123456701234567012345670") +testboth("%#-+.34o", big, "+0o0012345670123456701234567012345670") +testboth("%#-+39.34o", big, "+0o0012345670123456701234567012345670 ") +testboth("%#+39.34o", big, " +0o0012345670123456701234567012345670") # next one gets one leading zero from precision testboth("%.33o", big, "012345670123456701234567012345670") -# base marker shouldn't change that, since "0" is redundant -testboth("%#.33o", big, "012345670123456701234567012345670") -# but reduce precision, and base marker should add a zero -testboth("%#.32o", big, "012345670123456701234567012345670") -# one leading zero from precision, and another from "0" flag & width +# one leading zero from precision +testboth("%#.33o", big, "0o012345670123456701234567012345670") +# leading zero vanishes +testboth("%#.32o", big, "0o12345670123456701234567012345670") +# one leading zero from precision, and another from '0' flag & width testboth("%034.33o", big, "0012345670123456701234567012345670") -# base marker shouldn't change that -testboth("%0#34.33o", big, "0012345670123456701234567012345670") +# max width includes base marker; padding zeroes come after marker +testboth("%0#38.33o", big, "0o000012345670123456701234567012345670") +# padding spaces come before marker +testboth("%#36.33o", big, " 0o012345670123456701234567012345670") # Some small ints, in both Python int and long flavors). testboth("%d", 42, "42") @@ -171,10 +172,10 @@ testboth("%#x", 1, "0x1") testboth("%#X", 1, "0X1") testboth("%#X", 1, "0X1") -testboth("%#o", 1, "01") -testboth("%#o", 1, "01") -testboth("%#o", 0, "0") -testboth("%#o", 0, "0") +testboth("%#o", 1, "0o1") +testboth("%#o", 1, "0o1") +testboth("%#o", 0, "0o0") +testboth("%#o", 0, "0o0") testboth("%o", 0, "0") testboth("%o", 0, "0") testboth("%d", 0, "0") @@ -189,10 +190,10 @@ testboth("%x", 0x42, "42") testboth("%x", -0x42, "-42") -testboth("%o", 042, "42") -testboth("%o", -042, "-42") -testboth("%o", 042, "42") -testboth("%o", -042, "-42") +testboth("%o", 0o42, "42") +testboth("%o", -0o42, "-42") +testboth("%o", 0o42, "42") +testboth("%o", -0o42, "-42") # Test exception for unknown format characters if verbose: @@ -232,14 +233,6 @@ test_exc(u'no format', u'1', TypeError, "not all arguments converted during string formatting") -class Foobar(int): - def __oct__(self): - # Returning a non-string should not blow up. - return self + 1 - -test_exc('%o', Foobar(), TypeError, - "expected string or Unicode object, int found") - if maxsize == 2**31-1: # crashes 2.2.1 and earlier: try: Modified: python/branches/cpy_merge/Lib/test/test_grammar.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_grammar.py (original) +++ python/branches/cpy_merge/Lib/test/test_grammar.py Thu Jun 14 21:06:29 2007 @@ -27,26 +27,32 @@ self.assertEquals(x, 0, 'backslash ending comment') def testPlainIntegers(self): + self.assertEquals(type(000), type(0)) self.assertEquals(0xff, 255) - self.assertEquals(0377, 255) - self.assertEquals(2147483647, 017777777777) + self.assertEquals(0o377, 255) + self.assertEquals(2147483647, 0o17777777777) + self.assertEquals(0b1001, 9) from sys import maxint if maxint == 2147483647: - self.assertEquals(-2147483647-1, -020000000000) + self.assertEquals(-2147483647-1, -0o20000000000) # XXX -2147483648 - self.assert_(037777777777 > 0) + self.assert_(0o37777777777 > 0) self.assert_(0xffffffff > 0) - for s in '2147483648', '040000000000', '0x100000000': + self.assert_(0b1111111111111111111111111111111 > 0) + for s in ('2147483648', '0o40000000000', '0x100000000', + '0b10000000000000000000000000000000'): try: x = eval(s) except OverflowError: self.fail("OverflowError on huge integer literal %r" % s) elif maxint == 9223372036854775807: - self.assertEquals(-9223372036854775807-1, -01000000000000000000000) - self.assert_(01777777777777777777777 > 0) + self.assertEquals(-9223372036854775807-1, -0o1000000000000000000000) + self.assert_(0o1777777777777777777777 > 0) self.assert_(0xffffffffffffffff > 0) - for s in '9223372036854775808', '02000000000000000000000', \ - '0x10000000000000000': + self.assert_(0b11111111111111111111111111111111111111111111111111111111111111 > 0) + for s in '9223372036854775808', '0o2000000000000000000000', \ + '0x10000000000000000', \ + '0b100000000000000000000000000000000000000000000000000000000000000': try: x = eval(s) except OverflowError: @@ -56,13 +62,13 @@ def testLongIntegers(self): x = 0 - x = 0 - x = 0xffffffffffffffff x = 0xffffffffffffffff - x = 077777777777777777 - x = 077777777777777777 - x = 123456789012345678901234567890 + x = 0Xffffffffffffffff + x = 0o77777777777777777 + x = 0O77777777777777777 x = 123456789012345678901234567890 + x = 0b100000000000000000000000000000000000000000000000000000000000000000000 + x = 0B111111111111111111111111111111111111111111111111111111111111111111111 def testFloats(self): x = 3.14 Modified: python/branches/cpy_merge/Lib/test/test_hexoct.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_hexoct.py (original) +++ python/branches/cpy_merge/Lib/test/test_hexoct.py Thu Jun 14 21:06:29 2007 @@ -65,49 +65,49 @@ def test_oct_baseline(self): # Baseline tests self.assertEqual(00, 0) - self.assertEqual(020, 16) + self.assertEqual(0o20, 16) if platform_long_is_32_bits: - self.assertEqual(017777777777, 2147483647) + self.assertEqual(0o17777777777, 2147483647) else: - self.assertEqual(0777777777777777777777, 9223372036854775807) + self.assertEqual(0o777777777777777777777, 9223372036854775807) # Ditto with a minus sign and parentheses self.assertEqual(-(00), 0) - self.assertEqual(-(020), -16) + self.assertEqual(-(0o20), -16) if platform_long_is_32_bits: - self.assertEqual(-(017777777777), -2147483647) + self.assertEqual(-(0o17777777777), -2147483647) else: - self.assertEqual(-(0777777777777777777777), -9223372036854775807) + self.assertEqual(-(0o777777777777777777777), -9223372036854775807) # Ditto with a minus sign and NO parentheses self.assertEqual(-00, 0) - self.assertEqual(-020, -16) + self.assertEqual(-0o20, -16) if platform_long_is_32_bits: - self.assertEqual(-017777777777, -2147483647) + self.assertEqual(-0o17777777777, -2147483647) else: - self.assertEqual(-0777777777777777777777, -9223372036854775807) + self.assertEqual(-0o777777777777777777777, -9223372036854775807) def test_oct_unsigned(self): if platform_long_is_32_bits: # Positive constants - self.assertEqual(020000000000, 2147483648) - self.assertEqual(037777777777, 4294967295) + self.assertEqual(0o20000000000, 2147483648) + self.assertEqual(0o37777777777, 4294967295) # Ditto with a minus sign and parentheses - self.assertEqual(-(020000000000), -2147483648) - self.assertEqual(-(037777777777), -4294967295) + self.assertEqual(-(0o20000000000), -2147483648) + self.assertEqual(-(0o37777777777), -4294967295) # Ditto with a minus sign and NO parentheses # This failed in Python 2.2 through 2.2.2 and in 2.3a1 - self.assertEqual(-020000000000, -2147483648) - self.assertEqual(-037777777777, -4294967295) + self.assertEqual(-0o20000000000, -2147483648) + self.assertEqual(-0o37777777777, -4294967295) else: # Positive constants - self.assertEqual(01000000000000000000000, 9223372036854775808) - self.assertEqual(01777777777777777777777, 18446744073709551615) + self.assertEqual(0o1000000000000000000000, 9223372036854775808) + self.assertEqual(0o1777777777777777777777, 18446744073709551615) # Ditto with a minus sign and parentheses - self.assertEqual(-(01000000000000000000000), -9223372036854775808) - self.assertEqual(-(01777777777777777777777), -18446744073709551615) + self.assertEqual(-(0o1000000000000000000000), -9223372036854775808) + self.assertEqual(-(0o1777777777777777777777), -18446744073709551615) # Ditto with a minus sign and NO parentheses # This failed in Python 2.2 through 2.2.2 and in 2.3a1 - self.assertEqual(-01000000000000000000000, -9223372036854775808) - self.assertEqual(-01777777777777777777777, -18446744073709551615) + self.assertEqual(-0o1000000000000000000000, -9223372036854775808) + self.assertEqual(-0o1777777777777777777777, -18446744073709551615) def test_main(): test_support.run_unittest(TextHexOct) Modified: python/branches/cpy_merge/Lib/test/test_isinstance.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_isinstance.py (original) +++ python/branches/cpy_merge/Lib/test/test_isinstance.py Thu Jun 14 21:06:29 2007 @@ -15,7 +15,7 @@ # (leading to an "undetected error" in the debug build). Set up is, # isinstance(inst, cls) where: # - # - cls isn't a ClassType, a TypeType, or a TupleType + # - cls isn't a a type, or a tuple # - cls has a __bases__ attribute # - inst has a __class__ attribute # - inst.__class__ as no __bases__ attribute Modified: python/branches/cpy_merge/Lib/test/test_list.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_list.py (original) +++ python/branches/cpy_merge/Lib/test/test_list.py Thu Jun 14 21:06:29 2007 @@ -5,7 +5,7 @@ type2test = list def test_truth(self): - super(ListTest, self).test_truth() + super().test_truth() self.assert_(not []) self.assert_([42]) @@ -13,7 +13,7 @@ self.assert_([] is not []) def test_len(self): - super(ListTest, self).test_len() + super().test_len() self.assertEqual(len([]), 0) self.assertEqual(len([0]), 1) self.assertEqual(len([0, 1, 2]), 3) Modified: python/branches/cpy_merge/Lib/test/test_logging.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_logging.py (original) +++ python/branches/cpy_merge/Lib/test/test_logging.py Thu Jun 14 21:06:29 2007 @@ -25,7 +25,7 @@ """ import select -import os, sys, struct, types, pickle, cStringIO +import os, sys, struct, pickle, cStringIO import socket, tempfile, threading, time import logging, logging.handlers, logging.config from test.test_support import run_with_locale Modified: python/branches/cpy_merge/Lib/test/test_long.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_long.py (original) +++ python/branches/cpy_merge/Lib/test/test_long.py Thu Jun 14 21:06:29 2007 @@ -195,9 +195,6 @@ self.check_bitop_identities_3(x, y, self.getran((lenx + leny)//2)) def slow_format(self, x, base): - if (x, base) == (0, 8): - # this is an oddball! - return "0" digits = [] sign = 0 if x < 0: @@ -208,7 +205,7 @@ digits.reverse() digits = digits or [0] return '-'[:sign] + \ - {8: '0', 10: '', 16: '0x'}[base] + \ + {2: '0b', 8: '0o', 10: '', 16: '0x'}[base] + \ "".join(map(lambda i: "0123456789abcdef"[i], digits)) def check_format_1(self, x): Modified: python/branches/cpy_merge/Lib/test/test_multibytecodec.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_multibytecodec.py (original) +++ python/branches/cpy_merge/Lib/test/test_multibytecodec.py Thu Jun 14 21:06:29 2007 @@ -136,11 +136,21 @@ self.assertRaises(UnicodeDecodeError, decoder.decode, '', True) self.assertEqual(decoder.decode('B@$'), u'\u4e16') +class Test_StreamReader(unittest.TestCase): + def test_bug1728403(self): + try: + open(TESTFN, 'w').write('\xa1') + f = codecs.open(TESTFN, encoding='cp949') + self.assertRaises(UnicodeDecodeError, f.read, 2) + finally: + try: f.close() + except: pass + os.unlink(TESTFN) class Test_StreamWriter(unittest.TestCase): if len(u'\U00012345') == 2: # UCS2 def test_gb18030(self): - s= StringIO.StringIO() + s = StringIO.StringIO() c = codecs.getwriter('gb18030')(s) c.write(u'123') self.assertEqual(s.getvalue(), '123') Modified: python/branches/cpy_merge/Lib/test/test_optparse.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_optparse.py (original) +++ python/branches/cpy_merge/Lib/test/test_optparse.py Thu Jun 14 21:06:29 2007 @@ -12,7 +12,6 @@ import os import re import copy -import types import unittest from StringIO import StringIO @@ -171,7 +170,7 @@ except InterceptedError as err: self.assert_( - type(output) is types.StringType, + isinstance(output, str), "expected output to be an ordinary string, not %r" % type(output)) @@ -432,18 +431,12 @@ self.parser.add_option("-s", type="str") self.assertEquals(self.parser.get_option("-s").type, "string") - def test_new_type_object(self): + def test_type_object(self): self.parser.add_option("-s", type=str) self.assertEquals(self.parser.get_option("-s").type, "string") self.parser.add_option("-x", type=int) self.assertEquals(self.parser.get_option("-x").type, "int") - def test_old_type_object(self): - self.parser.add_option("-s", type=types.StringType) - self.assertEquals(self.parser.get_option("-s").type, "string") - self.parser.add_option("-x", type=types.IntType) - self.assertEquals(self.parser.get_option("-x").type, "int") - # Custom type for testing processing of default values. _time_units = { 's' : 1, 'm' : 60, 'h' : 60*60, 'd' : 60*60*24 } @@ -1470,7 +1463,7 @@ os.environ['COLUMNS'] = orig_columns def assertHelpEquals(self, expected_output): - if type(expected_output) is types.UnicodeType: + if isinstance(expected_output, unicode): encoding = self.parser._get_encoding(sys.stdout) expected_output = expected_output.encode(encoding, "replace") Modified: python/branches/cpy_merge/Lib/test/test_peepholer.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_peepholer.py (original) +++ python/branches/cpy_merge/Lib/test/test_peepholer.py Thu Jun 14 21:06:29 2007 @@ -39,16 +39,24 @@ asm = dis_single(line) self.assert_(elem in asm) - def test_none_as_constant(self): - # LOAD_GLOBAL None --> LOAD_CONST None + def test_global_as_constant(self): + # LOAD_GLOBAL None/True/False --> LOAD_CONST None/True/False def f(x): None + None return x - asm = disassemble(f) - for elem in ('LOAD_GLOBAL',): - self.assert_(elem not in asm) - for elem in ('LOAD_CONST', '(None)'): - self.assert_(elem in asm) + def g(x): + True + return x + def h(x): + False + return x + for func, name in ((f, 'None'), (g, 'True'), (h, 'False')): + asm = disassemble(func) + for elem in ('LOAD_GLOBAL',): + self.assert_(elem not in asm) + for elem in ('LOAD_CONST', '('+name+')'): + self.assert_(elem in asm) def f(): 'Adding a docstring made this test fail in Py2.5.0' return None Modified: python/branches/cpy_merge/Lib/test/test_pep352.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_pep352.py (original) +++ python/branches/cpy_merge/Lib/test/test_pep352.py Thu Jun 14 21:06:29 2007 @@ -133,22 +133,22 @@ """Catching 'object_' should raise a TypeError.""" try: try: - raise StandardError + raise Exception except object_: pass except TypeError: pass - except StandardError: + except Exception: self.fail("TypeError expected when catching %s" % type(object_)) try: try: - raise StandardError + raise Exception except (object_,): pass except TypeError: return - except StandardError: + except Exception: self.fail("TypeError expected when catching %s as specified in a " "tuple" % type(object_)) Modified: python/branches/cpy_merge/Lib/test/test_pyclbr.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_pyclbr.py (original) +++ python/branches/cpy_merge/Lib/test/test_pyclbr.py Thu Jun 14 21:06:29 2007 @@ -4,7 +4,7 @@ ''' from test.test_support import run_unittest import unittest, sys -from types import ClassType, FunctionType, MethodType, BuiltinFunctionType +from types import FunctionType, MethodType, BuiltinFunctionType import pyclbr from unittest import TestCase @@ -95,7 +95,7 @@ continue # skip functions that came from somewhere else self.assertEquals(py_item.__module__, value.module) else: - self.failUnless(isinstance(py_item, (ClassType, type))) + self.failUnless(isinstance(py_item, type)) if py_item.__module__ != moduleName: continue # skip classes that came from somewhere else @@ -133,14 +133,14 @@ # Now check for missing stuff. def defined_in(item, module): - if isinstance(item, ClassType): + if isinstance(item, type): return item.__module__ == module.__name__ if isinstance(item, FunctionType): return item.__globals__ is module.__dict__ return False for name in dir(module): item = getattr(module, name) - if isinstance(item, (ClassType, FunctionType)): + if isinstance(item, (type, FunctionType)): if defined_in(item, module): self.assertHaskey(dict, name, ignore) Modified: python/branches/cpy_merge/Lib/test/test_repr.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_repr.py (original) +++ python/branches/cpy_merge/Lib/test/test_repr.py Thu Jun 14 21:06:29 2007 @@ -10,6 +10,7 @@ from test.test_support import run_unittest from repr import repr as r # Don't shadow builtin repr +from repr import Repr def nestedTuple(nesting): @@ -34,6 +35,18 @@ expected = repr(s)[:13] + "..." + repr(s)[-14:] eq(r(s), expected) + def test_tuple(self): + eq = self.assertEquals + eq(r((1,)), "(1,)") + + t3 = (1, 2, 3) + eq(r(t3), "(1, 2, 3)") + + r2 = Repr() + r2.maxtuple = 2 + expected = repr(t3)[:-2] + "...)" + eq(r2.repr(t3), expected) + def test_container(self): from array import array from collections import deque Modified: python/branches/cpy_merge/Lib/test/test_str.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_str.py (original) +++ python/branches/cpy_merge/Lib/test/test_str.py Thu Jun 14 21:06:29 2007 @@ -1,4 +1,7 @@ + import unittest +import struct +import sys from test import test_support, string_tests @@ -90,6 +93,15 @@ self.assertEqual(str(Foo9("foo")), "string") self.assertEqual(unicode(Foo9("foo")), u"not unicode") + def test_expandtabs_overflows_gracefully(self): + # This test only affects 32-bit platforms because expandtabs can only take + # an int as the max value, not a 64-bit C long. If expandtabs is changed + # to take a 64-bit long, this test should apply to all platforms. + if sys.maxint > (1 << 32) or struct.calcsize('P') != 4: + return + self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxint) + + def test_main(): test_support.run_unittest(StrTest) Modified: python/branches/cpy_merge/Lib/test/test_strptime.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_strptime.py (original) +++ python/branches/cpy_merge/Lib/test/test_strptime.py Thu Jun 14 21:06:29 2007 @@ -190,6 +190,15 @@ "locale data that contains regex metacharacters is not" " properly escaped") + def test_whitespace_substitution(self): + # When pattern contains whitespace, make sure it is taken into account + # so as to not allow to subpatterns to end up next to each other and + # "steal" characters from each other. + pattern = self.time_re.pattern('%j %H') + self.failUnless(not re.match(pattern, "180")) + self.failUnless(re.match(pattern, "18 0")) + + class StrptimeTests(unittest.TestCase): """Tests for _strptime.strptime.""" @@ -463,8 +472,8 @@ "of the year") test_helper((1917, 12, 31), "Dec 31 on Monday with year starting and " "ending on Monday") - test_helper((2007, 01, 07), "First Sunday of 2007") - test_helper((2007, 01, 14), "Second Sunday of 2007") + test_helper((2007, 1, 7), "First Sunday of 2007") + test_helper((2007, 1, 14), "Second Sunday of 2007") test_helper((2006, 12, 31), "Last Sunday of 2006") test_helper((2006, 12, 24), "Second to last Sunday of 2006") Modified: python/branches/cpy_merge/Lib/test/test_structmembers.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_structmembers.py (original) +++ python/branches/cpy_merge/Lib/test/test_structmembers.py Thu Jun 14 21:06:29 2007 @@ -2,7 +2,8 @@ CHAR_MAX, CHAR_MIN, UCHAR_MAX, \ SHRT_MAX, SHRT_MIN, USHRT_MAX, \ INT_MAX, INT_MIN, UINT_MAX, \ - LONG_MAX, LONG_MIN, ULONG_MAX + LONG_MAX, LONG_MIN, ULONG_MAX, \ + LLONG_MAX, LLONG_MIN, ULLONG_MAX import warnings, unittest from test import test_support @@ -39,6 +40,23 @@ ts.T_ULONG=ULONG_MAX self.assertEquals(ts.T_ULONG, ULONG_MAX) + ## T_LONGLONG and T_ULONGLONG may not be present on some platforms + if hasattr(ts, 'T_LONGLONG'): + ts.T_LONGLONG=LLONG_MAX + self.assertEquals(ts.T_LONGLONG, LLONG_MAX) + ts.T_LONGLONG=LLONG_MIN + self.assertEquals(ts.T_LONGLONG, LLONG_MIN) + + ts.T_ULONGLONG=ULLONG_MAX + self.assertEquals(ts.T_ULONGLONG, ULLONG_MAX) + + ## make sure these will accept a plain int as well as a long + ts.T_LONGLONG=3 + self.assertEquals(ts.T_LONGLONG, 3) + ts.T_ULONGLONG=4 + self.assertEquals(ts.T_ULONGLONG, 4) + + class TestWarnings(unittest.TestCase): def has_warned(self, w): self.assert_(w.category is RuntimeWarning) Modified: python/branches/cpy_merge/Lib/test/test_subprocess.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_subprocess.py (original) +++ python/branches/cpy_merge/Lib/test/test_subprocess.py Thu Jun 14 21:06:29 2007 @@ -533,7 +533,7 @@ os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" % sys.executable) os.close(f) - os.chmod(fname, 0700) + os.chmod(fname, 0o700) p = subprocess.Popen(fname) p.wait() os.remove(fname) @@ -575,7 +575,7 @@ os.write(f, "exec %s -c 'import sys; sys.exit(47)'\n" % sys.executable) os.close(f) - os.chmod(fname, 0700) + os.chmod(fname, 0o700) rc = subprocess.call(fname) os.remove(fname) self.assertEqual(rc, 47) Modified: python/branches/cpy_merge/Lib/test/test_sundry.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_sundry.py (original) +++ python/branches/cpy_merge/Lib/test/test_sundry.py Thu Jun 14 21:06:29 2007 @@ -1,6 +1,7 @@ """Do a minimal test of all the modules that aren't otherwise tested.""" from test.test_support import guard_warnings_filter +import sys import warnings with guard_warnings_filter(): @@ -18,6 +19,53 @@ import cmd import code import compileall + + import distutils.archive_util + import distutils.bcppcompiler + import distutils.ccompiler + import distutils.cmd + import distutils.core + import distutils.cygwinccompiler + import distutils.dep_util + import distutils.dir_util + import distutils.emxccompiler + import distutils.errors + import distutils.extension + import distutils.file_util + import distutils.filelist + import distutils.log + if sys.platform.startswith('win'): + import distutils.msvccompiler + import distutils.mwerkscompiler + import distutils.sysconfig + import distutils.text_file + import distutils.unixccompiler + import distutils.util + import distutils.version + + import distutils.command.bdist_dumb + if sys.platform.startswith('win'): + import distutils.command.bdist_msi + import distutils.command.bdist + import distutils.command.bdist_rpm + import distutils.command.bdist_wininst + import distutils.command.build_clib + import distutils.command.build_ext + import distutils.command.build + import distutils.command.build_py + import distutils.command.build_scripts + import distutils.command.clean + import distutils.command.config + import distutils.command.install_data + import distutils.command.install_egg_info + import distutils.command.install_headers + import distutils.command.install_lib + import distutils.command.install + import distutils.command.install_scripts + import distutils.command.register + import distutils.command.sdist + import distutils.command.upload + import encodings import formatter import ftplib @@ -37,7 +85,6 @@ import os2emxpath import pdb import pipes - #import poplib import pstats import py_compile import pydoc Modified: python/branches/cpy_merge/Lib/test/test_tarfile.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_tarfile.py (original) +++ python/branches/cpy_merge/Lib/test/test_tarfile.py Thu Jun 14 21:06:29 2007 @@ -164,7 +164,7 @@ def test_check_members(self): for tarinfo in self.tar: - self.assert_(int(tarinfo.mtime) == 07606136617, + self.assert_(int(tarinfo.mtime) == 0o7606136617, "wrong mtime for %s" % tarinfo.name) if not tarinfo.name.startswith("ustar/"): continue @@ -299,7 +299,7 @@ self.assert_(md5sum(self.tar.extractfile(tarinfo).read()) == chksum, "wrong md5sum for %s" % tarinfo.name) - kwargs["mtime"] = 07606136617 + kwargs["mtime"] = 0o7606136617 kwargs["uid"] = 1000 kwargs["gid"] = 100 if "old-v7" not in tarinfo.name: @@ -979,7 +979,7 @@ # uid > 8 digits tarinfo = tarfile.TarInfo("name") - tarinfo.uid = 010000000 + tarinfo.uid = 0o10000000 self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT) def test_gnu_limits(self): @@ -992,7 +992,7 @@ # uid >= 256 ** 7 tarinfo = tarfile.TarInfo("name") - tarinfo.uid = 04000000000000000000 + tarinfo.uid = 0o4000000000000000000 self.assertRaises(ValueError, tarinfo.tobuf, tarfile.GNU_FORMAT) def test_pax_limits(self): @@ -1004,7 +1004,7 @@ tarinfo.tobuf(tarfile.PAX_FORMAT) tarinfo = tarfile.TarInfo("name") - tarinfo.uid = 04000000000000000000 + tarinfo.uid = 0o4000000000000000000 tarinfo.tobuf(tarfile.PAX_FORMAT) Modified: python/branches/cpy_merge/Lib/test/test_tempfile.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_tempfile.py (original) +++ python/branches/cpy_merge/Lib/test/test_tempfile.py Thu Jun 14 21:06:29 2007 @@ -264,7 +264,7 @@ file = self.do_create() mode = stat.S_IMODE(os.stat(file.name).st_mode) - expected = 0600 + expected = 0o600 if sys.platform in ('win32', 'os2emx', 'mac'): # There's no distinction among 'user', 'group' and 'world'; # replicate the 'user' bits. @@ -482,8 +482,8 @@ dir = self.do_create() try: mode = stat.S_IMODE(os.stat(dir).st_mode) - mode &= 0777 # Mask off sticky bits inherited from /tmp - expected = 0700 + mode &= 0o777 # Mask off sticky bits inherited from /tmp + expected = 0o700 if sys.platform in ('win32', 'os2emx', 'mac'): # There's no distinction among 'user', 'group' and 'world'; # replicate the 'user' bits. @@ -517,7 +517,7 @@ self.name = tempfile.mktemp(dir=dir, prefix=pre, suffix=suf) # Create the file. This will raise an exception if it's # mysteriously appeared in the meanwhile. - os.close(os.open(self.name, self._bflags, 0600)) + os.close(os.open(self.name, self._bflags, 0o600)) def __del__(self): self._unlink(self.name) Modified: python/branches/cpy_merge/Lib/test/test_threading.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_threading.py (original) +++ python/branches/cpy_merge/Lib/test/test_threading.py Thu Jun 14 21:06:29 2007 @@ -3,6 +3,7 @@ import test.test_support from test.test_support import verbose import random +import sys import threading import thread import time @@ -201,8 +202,47 @@ t.join() # else the thread is still running, and we have no way to kill it +class ThreadingExceptionTests(unittest.TestCase): + # A RuntimeError should be raised if Thread.start() is called + # multiple times. + def test_start_thread_again(self): + thread = threading.Thread() + thread.start() + self.assertRaises(RuntimeError, thread.start) + + def test_releasing_unacquired_rlock(self): + rlock = threading.RLock() + self.assertRaises(RuntimeError, rlock.release) + + def test_waiting_on_unacquired_condition(self): + cond = threading.Condition() + self.assertRaises(RuntimeError, cond.wait) + + def test_notify_on_unacquired_condition(self): + cond = threading.Condition() + self.assertRaises(RuntimeError, cond.notify) + + def test_semaphore_with_negative_value(self): + self.assertRaises(ValueError, threading.Semaphore, value = -1) + self.assertRaises(ValueError, threading.Semaphore, value = -sys.maxint) + + def test_joining_current_thread(self): + currentThread = threading.currentThread() + self.assertRaises(RuntimeError, currentThread.join); + + def test_joining_inactive_thread(self): + thread = threading.Thread() + self.assertRaises(RuntimeError, thread.join) + + def test_daemonize_active_thread(self): + thread = threading.Thread() + thread.start() + self.assertRaises(RuntimeError, thread.setDaemon, True) + + def test_main(): - test.test_support.run_unittest(ThreadTests) + test.test_support.run_unittest(ThreadTests, + ThreadingExceptionTests) if __name__ == "__main__": test_main() Modified: python/branches/cpy_merge/Lib/test/test_tuple.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_tuple.py (original) +++ python/branches/cpy_merge/Lib/test/test_tuple.py Thu Jun 14 21:06:29 2007 @@ -5,30 +5,30 @@ type2test = tuple def test_constructors(self): - super(TupleTest, self).test_len() + super().test_len() # calling built-in types without argument must return empty self.assertEqual(tuple(), ()) def test_truth(self): - super(TupleTest, self).test_truth() + super().test_truth() self.assert_(not ()) self.assert_((42, )) def test_len(self): - super(TupleTest, self).test_len() + super().test_len() self.assertEqual(len(()), 0) self.assertEqual(len((0,)), 1) self.assertEqual(len((0, 1, 2)), 3) def test_iadd(self): - super(TupleTest, self).test_iadd() + super().test_iadd() u = (0, 1) u2 = u u += (2, 3) self.assert_(u is not u2) def test_imul(self): - super(TupleTest, self).test_imul() + super().test_imul() u = (0, 1) u2 = u u *= 3 Modified: python/branches/cpy_merge/Lib/test/test_unicode.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_unicode.py (original) +++ python/branches/cpy_merge/Lib/test/test_unicode.py Thu Jun 14 21:06:29 2007 @@ -6,7 +6,7 @@ (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" -import unittest, sys, codecs, new +import unittest, sys, struct, codecs, new from test import test_support, string_tests # Error handling (bad decoder return) @@ -825,8 +825,13 @@ self.assertEqual(repr(s1()), '\\n') self.assertEqual(repr(s2()), '\\n') - - + def test_expandtabs_overflows_gracefully(self): + # This test only affects 32-bit platforms because expandtabs can only take + # an int as the max value, not a 64-bit C long. If expandtabs is changed + # to take a 64-bit long, this test should apply to all platforms. + if sys.maxint > (1 << 32) or struct.calcsize('P') != 4: + return + self.assertRaises(OverflowError, u't\tt\t'.expandtabs, sys.maxint) def test_main(): Modified: python/branches/cpy_merge/Lib/test/test_unicode_file.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_unicode_file.py (original) +++ python/branches/cpy_merge/Lib/test/test_unicode_file.py Thu Jun 14 21:06:29 2007 @@ -48,7 +48,7 @@ self.failUnless(os.path.exists(os.path.abspath(filename))) self.failUnless(os.path.isfile(os.path.abspath(filename))) self.failUnless(os.access(os.path.abspath(filename), os.R_OK)) - os.chmod(filename, 0777) + os.chmod(filename, 0o777) os.utime(filename, None) os.utime(filename, (time.time(), time.time())) # Copy/rename etc tests using the same filename Modified: python/branches/cpy_merge/Lib/test/test_unittest.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_unittest.py (original) +++ python/branches/cpy_merge/Lib/test/test_unittest.py Thu Jun 14 21:06:29 2007 @@ -16,23 +16,23 @@ class LoggingResult(unittest.TestResult): def __init__(self, log): self._events = log - super(LoggingResult, self).__init__() + super().__init__() def startTest(self, test): self._events.append('startTest') - super(LoggingResult, self).startTest(test) + super().startTest(test) def stopTest(self, test): self._events.append('stopTest') - super(LoggingResult, self).stopTest(test) + super().stopTest(test) def addFailure(self, *args): self._events.append('addFailure') - super(LoggingResult, self).addFailure(*args) + super().addFailure(*args) def addError(self, *args): self._events.append('addError') - super(LoggingResult, self).addError(*args) + super().addError(*args) class TestEquality(object): # Check for a valid __eq__ implementation Modified: python/branches/cpy_merge/Lib/test/test_urllib2.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_urllib2.py (original) +++ python/branches/cpy_merge/Lib/test/test_urllib2.py Thu Jun 14 21:06:29 2007 @@ -544,7 +544,7 @@ class NullFTPHandler(urllib2.FTPHandler): def __init__(self, data): self.data = data - def connect_ftp(self, user, passwd, host, port, dirs): + def connect_ftp(self, user, passwd, host, port, dirs, timeout=None): self.user, self.passwd = user, passwd self.host, self.port = host, port self.dirs = dirs @@ -567,7 +567,9 @@ "localhost", ftplib.FTP_PORT, "A", [], "baz.gif", None), # XXX really this should guess image/gif ]: - r = h.ftp_open(Request(url)) + req = Request(url) + req.timeout = None + r = h.ftp_open(req) # ftp authentication not yet implemented by FTPHandler self.assert_(h.user == h.passwd == "") self.assertEqual(h.host, socket.gethostbyname(host)) @@ -682,8 +684,9 @@ self.req_headers = [] self.data = None self.raise_on_endheaders = False - def __call__(self, host): + def __call__(self, host, timeout=None): self.host = host + self.timeout = timeout return self def set_debuglevel(self, level): self.level = level @@ -706,6 +709,7 @@ url = "http://example.com/" for method, data in [("GET", None), ("POST", "blah")]: req = Request(url, data, {"Foo": "bar"}) + req.timeout = None req.add_unredirected_header("Spam", "eggs") http = MockHTTPClass() r = h.do_open(http, req) Modified: python/branches/cpy_merge/Lib/test/test_urllib2net.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_urllib2net.py (original) +++ python/branches/cpy_merge/Lib/test/test_urllib2net.py Thu Jun 14 21:06:29 2007 @@ -267,6 +267,49 @@ return handlers +class TimeoutTest(unittest.TestCase): + def test_http_basic(self): + u = urllib2.urlopen("http://www.python.org") + self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None) + + def test_http_NoneWithdefault(self): + prev = socket.getdefaulttimeout() + socket.setdefaulttimeout(60) + try: + u = urllib2.urlopen("http://www.python.org", timeout=None) + self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 60) + finally: + socket.setdefaulttimeout(prev) + + def test_http_Value(self): + u = urllib2.urlopen("http://www.python.org", timeout=120) + self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 120) + + def test_http_NoneNodefault(self): + u = urllib2.urlopen("http://www.python.org", timeout=None) + self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None) + + def test_ftp_basic(self): + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/") + self.assertTrue(u.fp.fp._sock.gettimeout() is None) + + def test_ftp_NoneWithdefault(self): + prev = socket.getdefaulttimeout() + socket.setdefaulttimeout(60) + try: + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None) + self.assertEqual(u.fp.fp._sock.gettimeout(), 60) + finally: + socket.setdefaulttimeout(prev) + + def test_ftp_NoneNodefault(self): + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=None) + self.assertTrue(u.fp.fp._sock.gettimeout() is None) + + def test_ftp_Value(self): + u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/", timeout=60) + self.assertEqual(u.fp.fp._sock.gettimeout(), 60) + def test_main(): test_support.requires("network") @@ -275,6 +318,7 @@ AuthTests, OtherNetworkTests, CloseSocketTest, + TimeoutTest, ) if __name__ == "__main__": Modified: python/branches/cpy_merge/Lib/test/test_userlist.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_userlist.py (original) +++ python/branches/cpy_merge/Lib/test/test_userlist.py Thu Jun 14 21:06:29 2007 @@ -8,7 +8,7 @@ type2test = UserList def test_getslice(self): - super(UserListTest, self).test_getslice() + super().test_getslice() l = [0, 1, 2, 3, 4] u = self.type2test(l) for i in range(-3, 6): @@ -30,7 +30,7 @@ self.assertEqual(u2, list("spameggs")) def test_iadd(self): - super(UserListTest, self).test_iadd() + super().test_iadd() u = [0, 1] u += UserList([0, 1]) self.assertEqual(u, [0, 1, 0, 1]) Modified: python/branches/cpy_merge/Lib/test/test_uu.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_uu.py (original) +++ python/branches/cpy_merge/Lib/test/test_uu.py Thu Jun 14 21:06:29 2007 @@ -24,21 +24,21 @@ inp = cStringIO.StringIO(plaintext) out = cStringIO.StringIO() uu.encode(inp, out, "t1") - self.assertEqual(out.getvalue(), encodedtextwrapped % (0666, "t1")) + self.assertEqual(out.getvalue(), encodedtextwrapped % (0o666, "t1")) inp = cStringIO.StringIO(plaintext) out = cStringIO.StringIO() - uu.encode(inp, out, "t1", 0644) - self.assertEqual(out.getvalue(), encodedtextwrapped % (0644, "t1")) + uu.encode(inp, out, "t1", 0o644) + self.assertEqual(out.getvalue(), encodedtextwrapped % (0o644, "t1")) def test_decode(self): - inp = cStringIO.StringIO(encodedtextwrapped % (0666, "t1")) + inp = cStringIO.StringIO(encodedtextwrapped % (0o666, "t1")) out = cStringIO.StringIO() uu.decode(inp, out) self.assertEqual(out.getvalue(), plaintext) inp = cStringIO.StringIO( "UUencoded files may contain many lines,\n" + "even some that have 'begin' in them.\n" + - encodedtextwrapped % (0666, "t1") + encodedtextwrapped % (0o666, "t1") ) out = cStringIO.StringIO() uu.decode(inp, out) @@ -75,14 +75,14 @@ def test_encode(self): sys.stdin = cStringIO.StringIO(plaintext) sys.stdout = cStringIO.StringIO() - uu.encode("-", "-", "t1", 0666) + uu.encode("-", "-", "t1", 0o666) self.assertEqual( sys.stdout.getvalue(), - encodedtextwrapped % (0666, "t1") + encodedtextwrapped % (0o666, "t1") ) def test_decode(self): - sys.stdin = cStringIO.StringIO(encodedtextwrapped % (0666, "t1")) + sys.stdin = cStringIO.StringIO(encodedtextwrapped % (0o666, "t1")) sys.stdout = cStringIO.StringIO() uu.decode("-", "-") self.assertEqual(sys.stdout.getvalue(), plaintext) @@ -120,21 +120,21 @@ fin = open(self.tmpin, 'rb') fout = open(self.tmpout, 'w') - uu.encode(fin, fout, self.tmpin, mode=0644) + uu.encode(fin, fout, self.tmpin, mode=0o644) fin.close() fout.close() fout = open(self.tmpout, 'r') s = fout.read() fout.close() - self.assertEqual(s, encodedtextwrapped % (0644, self.tmpin)) + self.assertEqual(s, encodedtextwrapped % (0o644, self.tmpin)) # in_file and out_file as filenames - uu.encode(self.tmpin, self.tmpout, self.tmpin, mode=0644) + uu.encode(self.tmpin, self.tmpout, self.tmpin, mode=0o644) fout = open(self.tmpout, 'r') s = fout.read() fout.close() - self.assertEqual(s, encodedtextwrapped % (0644, self.tmpin)) + self.assertEqual(s, encodedtextwrapped % (0o644, self.tmpin)) finally: self._kill(fin) @@ -143,7 +143,7 @@ def test_decode(self): try: f = open(self.tmpin, 'w') - f.write(encodedtextwrapped % (0644, self.tmpout)) + f.write(encodedtextwrapped % (0o644, self.tmpout)) f.close() f = open(self.tmpin, 'r') @@ -161,7 +161,7 @@ def test_decodetwice(self): # Verify that decode() will refuse to overwrite an existing file try: - f = cStringIO.StringIO(encodedtextwrapped % (0644, self.tmpout)) + f = cStringIO.StringIO(encodedtextwrapped % (0o644, self.tmpout)) f = open(self.tmpin, 'r') uu.decode(f) Modified: python/branches/cpy_merge/Lib/test/test_weakref.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_weakref.py (original) +++ python/branches/cpy_merge/Lib/test/test_weakref.py Thu Jun 14 21:06:29 2007 @@ -651,10 +651,10 @@ class MyRef(weakref.ref): def __init__(self, ob, callback=None, value=42): self.value = value - super(MyRef, self).__init__(ob, callback) + super().__init__(ob, callback) def __call__(self): self.called = True - return super(MyRef, self).__call__() + return super().__call__() o = Object("foo") mr = MyRef(o, value=24) self.assert_(mr() is o) @@ -1091,7 +1091,7 @@ >>> import weakref >>> class ExtendedRef(weakref.ref): ... def __init__(self, ob, callback=None, **annotations): -... super(ExtendedRef, self).__init__(ob, callback) +... super().__init__(ob, callback) ... self.__counter = 0 ... for k, v in annotations.items(): ... setattr(self, k, v) @@ -1099,7 +1099,7 @@ ... '''Return a pair containing the referent and the number of ... times the reference has been called. ... ''' -... ob = super(ExtendedRef, self).__call__() +... ob = super().__call__() ... if ob is not None: ... self.__counter += 1 ... ob = (ob, self.__counter) Modified: python/branches/cpy_merge/Lib/test/test_xmlrpc.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_xmlrpc.py (original) +++ python/branches/cpy_merge/Lib/test/test_xmlrpc.py Thu Jun 14 21:06:29 2007 @@ -22,9 +22,9 @@ u'ukey\u4000': 'regular value', 'datetime1': xmlrpclib.DateTime('20050210T11:41:23'), 'datetime2': xmlrpclib.DateTime( - (2005, 02, 10, 11, 41, 23, 0, 1, -1)), + (2005, 2, 10, 11, 41, 23, 0, 1, -1)), 'datetime3': xmlrpclib.DateTime( - datetime.datetime(2005, 02, 10, 11, 41, 23)), + datetime.datetime(2005, 2, 10, 11, 41, 23)), }] class XMLRPCTestCase(unittest.TestCase): @@ -38,7 +38,7 @@ # by the marshalling code. This can't be done via test_dump_load() # since with use_datetime set to 1 the unmarshaller would create # datetime objects for the 'datetime[123]' keys as well - dt = datetime.datetime(2005, 02, 10, 11, 41, 23) + dt = datetime.datetime(2005, 2, 10, 11, 41, 23) s = xmlrpclib.dumps((dt,)) (newdt,), m = xmlrpclib.loads(s, use_datetime=1) self.assertEquals(newdt, dt) @@ -51,7 +51,7 @@ # This checks that an unwrapped datetime.date object can be handled # by the marshalling code. This can't be done via test_dump_load() # since the unmarshaller produces a datetime object - d = datetime.datetime(2005, 02, 10, 11, 41, 23).date() + d = datetime.datetime(2005, 2, 10, 11, 41, 23).date() s = xmlrpclib.dumps((d,)) (newd,), m = xmlrpclib.loads(s, use_datetime=1) self.assertEquals(newd.date(), d) @@ -65,7 +65,7 @@ # This checks that an unwrapped datetime.time object can be handled # by the marshalling code. This can't be done via test_dump_load() # since the unmarshaller produces a datetime object - t = datetime.datetime(2005, 02, 10, 11, 41, 23).time() + t = datetime.datetime(2005, 2, 10, 11, 41, 23).time() s = xmlrpclib.dumps((t,)) (newt,), m = xmlrpclib.loads(s, use_datetime=1) today = datetime.datetime.now().date().strftime("%Y%m%d") Modified: python/branches/cpy_merge/Lib/test/test_zipimport.py ============================================================================== --- python/branches/cpy_merge/Lib/test/test_zipimport.py (original) +++ python/branches/cpy_merge/Lib/test/test_zipimport.py Thu Jun 14 21:06:29 2007 @@ -364,7 +364,7 @@ finally: # If we leave "the read-only bit" set on Windows, nothing can # delete TESTMOD, and later tests suffer bogus failures. - os.chmod(TESTMOD, 0666) + os.chmod(TESTMOD, 0o666) test_support.unlink(TESTMOD) def testNotZipFile(self): Modified: python/branches/cpy_merge/Lib/test/tf_inherit_check.py ============================================================================== --- python/branches/cpy_merge/Lib/test/tf_inherit_check.py (original) +++ python/branches/cpy_merge/Lib/test/tf_inherit_check.py Thu Jun 14 21:06:29 2007 @@ -19,7 +19,7 @@ sys.stderr.write("fd %d is open in child" % fd) sys.exit(1) -except StandardError: +except Exception: if verbose: raise sys.exit(1) Modified: python/branches/cpy_merge/Lib/test/tokenize_tests.txt ============================================================================== --- python/branches/cpy_merge/Lib/test/tokenize_tests.txt (original) +++ python/branches/cpy_merge/Lib/test/tokenize_tests.txt Thu Jun 14 21:06:29 2007 @@ -37,21 +37,21 @@ # Ordinary integers 0xff != 255 -0377 != 255 -2147483647 != 017777777777 --2147483647-1 != 020000000000 -037777777777 != -1 -0xffffffff != -1 +0o377 != 255 +2147483647 != 0o17777777777 +-2147483647-1 != 0o20000000000 +0o37777777777 != -1 +0xffffffff != -1; 0o37777777777 != -1; -0o1234567 == 0O001234567; 0b10101 == 0B00010101 # Long integers -x = 0L -x = 0l -x = 0xffffffffffffffffL -x = 0xffffffffffffffffl -x = 077777777777777777L -x = 077777777777777777l -x = 123456789012345678901234567890L -x = 123456789012345678901234567890l +x = 0 +x = 0 +x = 0xffffffffffffffff +x = 0xffffffffffffffff +x = 0o77777777777777777 +x = 0B11101010111111111 +x = 123456789012345678901234567890 +x = 123456789012345678901234567890 # Floating-point numbers x = 3.14 Modified: python/branches/cpy_merge/Lib/threading.py ============================================================================== --- python/branches/cpy_merge/Lib/threading.py (original) +++ python/branches/cpy_merge/Lib/threading.py Thu Jun 14 21:06:29 2007 @@ -111,8 +111,8 @@ __enter__ = acquire def release(self): - me = currentThread() - assert self.__owner is me, "release() of un-acquire()d lock" + if self.__owner is not currentThread(): + raise RuntimeError("cannot release un-aquired lock") self.__count = count = self.__count - 1 if not count: self.__owner = None @@ -203,7 +203,8 @@ return True def wait(self, timeout=None): - assert self._is_owned(), "wait() of un-acquire()d lock" + if not self._is_owned(): + raise RuntimeError("cannot wait on un-aquired lock") waiter = _allocate_lock() waiter.acquire() self.__waiters.append(waiter) @@ -244,7 +245,8 @@ self._acquire_restore(saved_state) def notify(self, n=1): - assert self._is_owned(), "notify() of un-acquire()d lock" + if not self._is_owned(): + raise RuntimeError("cannot notify on un-aquired lock") __waiters = self.__waiters waiters = __waiters[:n] if not waiters: @@ -272,7 +274,8 @@ # After Tim Peters' semaphore class, but not quite the same (no maximum) def __init__(self, value=1, verbose=None): - assert value >= 0, "Semaphore initial value must be >= 0" + if value < 0: + raise ValueError("semaphore initial value must be >= 0") _Verbose.__init__(self, verbose) self.__cond = Condition(Lock()) self.__value = value @@ -423,8 +426,10 @@ return "<%s(%s, %s)>" % (self.__class__.__name__, self.__name, status) def start(self): - assert self.__initialized, "Thread.__init__() not called" - assert not self.__started, "thread already started" + if not self.__initialized: + raise RuntimeError("thread.__init__() not called") + if self.__started: + raise RuntimeError("thread already started") if __debug__: self._note("%s.start(): starting thread", self) _active_limbo_lock.acquire() @@ -544,9 +549,13 @@ _active_limbo_lock.release() def join(self, timeout=None): - assert self.__initialized, "Thread.__init__() not called" - assert self.__started, "cannot join thread before it is started" - assert self is not currentThread(), "cannot join current thread" + if not self.__initialized: + raise RuntimeError("Thread.__init__() not called") + if not self.__started: + raise RuntimeError("cannot join thread before it is started") + if self is currentThread(): + raise RuntimeError("cannot join current thread") + if __debug__: if not self.__stopped: self._note("%s.join(): waiting until thread stops", self) @@ -589,8 +598,10 @@ return self.__daemonic def setDaemon(self, daemonic): - assert self.__initialized, "Thread.__init__() not called" - assert not self.__started, "cannot set daemon status of active thread" + if not self.__initialized: + raise RuntimeError("Thread.__init__() not called") + if self.__started: + raise RuntimeError("cannot set daemon status of active thread"); self.__daemonic = daemonic # The timer class was contributed by Itamar Shtull-Trauring Modified: python/branches/cpy_merge/Lib/tokenize.py ============================================================================== --- python/branches/cpy_merge/Lib/tokenize.py (original) +++ python/branches/cpy_merge/Lib/tokenize.py Thu Jun 14 21:06:29 2007 @@ -49,10 +49,11 @@ Ignore = Whitespace + any(r'\\\r?\n' + Whitespace) + maybe(Comment) Name = r'[a-zA-Z_]\w*' -Hexnumber = r'0[xX][\da-fA-F]*[lL]?' -Octnumber = r'0[0-7]*[lL]?' -Decnumber = r'[1-9]\d*[lL]?' -Intnumber = group(Hexnumber, Octnumber, Decnumber) +Hexnumber = r'0[xX][\da-fA-F]*' +Binnumber = r'0[bB][01]*' +Octnumber = r'0[oO][0-7]*' +Decnumber = r'(?:0+|[1-9]\d*)' +Intnumber = group(Hexnumber, Binnumber, Octnumber, Decnumber) Exponent = r'[eE][-+]?\d+' Pointfloat = group(r'\d+\.\d*', r'\.\d+') + maybe(Exponent) Expfloat = r'\d+' + Exponent Modified: python/branches/cpy_merge/Lib/types.py ============================================================================== --- python/branches/cpy_merge/Lib/types.py (original) +++ python/branches/cpy_merge/Lib/types.py Thu Jun 14 21:06:29 2007 @@ -50,7 +50,7 @@ class _C: def _m(self): pass -ClassType = type(_C) +ClassType = type UnboundMethodType = type(_C._m) # Same as MethodType MethodType = type(_C()._m) Modified: python/branches/cpy_merge/Lib/unittest.py ============================================================================== --- python/branches/cpy_merge/Lib/unittest.py (original) +++ python/branches/cpy_merge/Lib/unittest.py Thu Jun 14 21:06:29 2007 @@ -412,8 +412,7 @@ # sanity checks if not hasattr(test, '__call__'): raise TypeError("the test to add must be callable") - if (isinstance(test, (type, types.ClassType)) and - issubclass(test, (TestCase, TestSuite))): + if isinstance(test, type) and issubclass(test, (TestCase, TestSuite)): raise TypeError("TestCases and TestSuites must be instantiated " "before passing them to addTest()") self._tests.append(test) @@ -525,8 +524,7 @@ tests = [] for name in dir(module): obj = getattr(module, name) - if (isinstance(obj, (type, types.ClassType)) and - issubclass(obj, TestCase)): + if isinstance(obj, type) and issubclass(obj, TestCase): tests.append(self.loadTestsFromTestCase(obj)) return self.suiteClass(tests) @@ -556,11 +554,10 @@ if type(obj) == types.ModuleType: return self.loadTestsFromModule(obj) - elif (isinstance(obj, (type, types.ClassType)) and - issubclass(obj, TestCase)): + elif isinstance(obj, type) and issubclass(obj, TestCase): return self.loadTestsFromTestCase(obj) - elif (type(obj) == types.UnboundMethodType and - isinstance(parent, (type, types.ClassType)) and + elif (isinstance(obj, types.UnboundMethodType) and + isinstance(parent, type) and issubclass(parent, TestCase)): return TestSuite([parent(obj.__name__)]) elif isinstance(obj, TestSuite): @@ -816,7 +813,7 @@ self.module) def runTests(self): - if isinstance(self.testRunner, (type, types.ClassType)): + if isinstance(self.testRunner, type): try: testRunner = self.testRunner(verbosity=self.verbosity) except TypeError: Modified: python/branches/cpy_merge/Lib/urllib2.py ============================================================================== --- python/branches/cpy_merge/Lib/urllib2.py (original) +++ python/branches/cpy_merge/Lib/urllib2.py Thu Jun 14 21:06:29 2007 @@ -117,11 +117,11 @@ __version__ = sys.version[:3] _opener = None -def urlopen(url, data=None): +def urlopen(url, data=None, timeout=None): global _opener if _opener is None: _opener = build_opener() - return _opener.open(url, data) + return _opener.open(url, data, timeout) def install_opener(opener): global _opener @@ -355,7 +355,7 @@ if result is not None: return result - def open(self, fullurl, data=None): + def open(self, fullurl, data=None, timeout=None): # accept a URL or a Request object if isinstance(fullurl, basestring): req = Request(fullurl, data) @@ -364,6 +364,7 @@ if data is not None: req.add_data(data) + req.timeout = timeout protocol = req.get_type() # pre-process request @@ -431,9 +432,8 @@ If any of the handlers passed as arguments are subclasses of the default handlers, the default handlers will not be used. """ - import types def isclass(obj): - return isinstance(obj, types.ClassType) or hasattr(obj, "__bases__") + return isinstance(obj, type) or hasattr(obj, "__bases__") opener = OpenerDirector() default_classes = [ProxyHandler, UnknownHandler, HTTPHandler, @@ -948,7 +948,7 @@ respdig = KD(H(A1), "%s:%s" % (nonce, H(A2))) else: # XXX handle auth-int. - pass + raise URLError("qop '%s' is not supported." % qop) # XXX should the partial digests be encoded too? @@ -1057,7 +1057,7 @@ if not host: raise URLError('no host given') - h = http_class(host) # will parse host:port + h = http_class(host, timeout=req.timeout) # will parse host:port h.set_debuglevel(self._debuglevel) headers = dict(req.headers) @@ -1269,7 +1269,7 @@ if dirs and not dirs[0]: dirs = dirs[1:] try: - fw = self.connect_ftp(user, passwd, host, port, dirs) + fw = self.connect_ftp(user, passwd, host, port, dirs, req.timeout) type = file and 'I' or 'D' for attr in attrs: attr, value = splitvalue(attr) @@ -1289,8 +1289,8 @@ except ftplib.all_errors as msg: raise IOError, ('ftp error', msg), sys.exc_info()[2] - def connect_ftp(self, user, passwd, host, port, dirs): - fw = ftpwrapper(user, passwd, host, port, dirs) + def connect_ftp(self, user, passwd, host, port, dirs, timeout): + fw = ftpwrapper(user, passwd, host, port, dirs, timeout) ## fw.ftp.set_debuglevel(1) return fw @@ -1310,12 +1310,12 @@ def setMaxConns(self, m): self.max_conns = m - def connect_ftp(self, user, passwd, host, port, dirs): - key = user, host, port, '/'.join(dirs) + def connect_ftp(self, user, passwd, host, port, dirs, timeout): + key = user, host, port, '/'.join(dirs), timeout if key in self.cache: self.timeout[key] = time.time() + self.delay else: - self.cache[key] = ftpwrapper(user, passwd, host, port, dirs) + self.cache[key] = ftpwrapper(user, passwd, host, port, dirs, timeout) self.timeout[key] = time.time() + self.delay self.check_cache() return self.cache[key] Modified: python/branches/cpy_merge/Lib/uu.py ============================================================================== --- python/branches/cpy_merge/Lib/uu.py (original) +++ python/branches/cpy_merge/Lib/uu.py Thu Jun 14 21:06:29 2007 @@ -68,11 +68,11 @@ if name is None: name = '-' if mode is None: - mode = 0666 + mode = 0o666 # # Write the data # - out_file.write('begin %o %s\n' % ((mode&0777),name)) + out_file.write('begin %o %s\n' % ((mode & 0o777),name)) data = in_file.read(45) while len(data) > 0: out_file.write(binascii.b2a_uu(data)) Modified: python/branches/cpy_merge/Lib/warnings.py ============================================================================== --- python/branches/cpy_merge/Lib/warnings.py (original) +++ python/branches/cpy_merge/Lib/warnings.py Thu Jun 14 21:06:29 2007 @@ -3,7 +3,7 @@ # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. -import sys, types +import sys import linecache __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings", @@ -151,8 +151,7 @@ assert action in ("error", "ignore", "always", "default", "module", "once"), "invalid action: %r" % (action,) assert isinstance(message, basestring), "message must be a string" - assert isinstance(category, (type, types.ClassType)), \ - "category must be a class" + assert isinstance(category, type), "category must be a class" assert issubclass(category, Warning), "category must be a Warning subclass" assert isinstance(module, basestring), "module must be a string" assert isinstance(lineno, int) and lineno >= 0, \ Modified: python/branches/cpy_merge/Lib/weakref.py ============================================================================== --- python/branches/cpy_merge/Lib/weakref.py (original) +++ python/branches/cpy_merge/Lib/weakref.py Thu Jun 14 21:06:29 2007 @@ -204,7 +204,7 @@ return self def __init__(self, ob, callback, key): - super(KeyedRef, self).__init__(ob, callback) + super().__init__(ob, callback) class WeakKeyDictionary(UserDict.UserDict): Modified: python/branches/cpy_merge/Lib/wsgiref/headers.py ============================================================================== --- python/branches/cpy_merge/Lib/wsgiref/headers.py (original) +++ python/branches/cpy_merge/Lib/wsgiref/headers.py Thu Jun 14 21:06:29 2007 @@ -5,8 +5,6 @@ written by Barry Warsaw. """ -from types import ListType, TupleType - # Regular expression that matches `special' characters in parameters, the # existance of which force quoting of the parameter value. import re @@ -44,7 +42,7 @@ """Manage a collection of HTTP response headers""" def __init__(self,headers): - if type(headers) is not ListType: + if not isinstance(headers, list): raise TypeError("Headers must be a list of name/value tuples") self._headers = headers Modified: python/branches/cpy_merge/Lib/wsgiref/validate.py ============================================================================== --- python/branches/cpy_merge/Lib/wsgiref/validate.py (original) +++ python/branches/cpy_merge/Lib/wsgiref/validate.py Thu Jun 14 21:06:29 2007 @@ -113,7 +113,6 @@ import re import sys -from types import DictType, StringType, TupleType, ListType import warnings header_re = re.compile(r'^[a-zA-Z][a-zA-Z0-9\-_]*$') @@ -191,20 +190,20 @@ def read(self, *args): assert_(len(args) <= 1) v = self.input.read(*args) - assert_(type(v) is type("")) + assert_(isinstance(v, str)) return v def readline(self): v = self.input.readline() - assert_(type(v) is type("")) + assert_(isinstance(v, str)) return v def readlines(self, *args): assert_(len(args) <= 1) lines = self.input.readlines(*args) - assert_(type(lines) is type([])) + assert_(isinstance(lines, list)) for line in lines: - assert_(type(line) is type("")) + assert_(isinstance(line, str)) return lines def __iter__(self): @@ -223,7 +222,7 @@ self.errors = wsgi_errors def write(self, s): - assert_(type(s) is type("")) + assert_(isinstance(s, str)) self.errors.write(s) def flush(self): @@ -242,7 +241,7 @@ self.writer = wsgi_writer def __call__(self, s): - assert_(type(s) is type("")) + assert_(isinstance(s, str)) self.writer(s) class PartialIteratorWrapper: @@ -288,7 +287,7 @@ "Iterator garbage collected without being closed") def check_environ(environ): - assert_(type(environ) is DictType, + assert_(isinstance(environ, dict), "Environment is not of the right type: %r (environment: %r)" % (type(environ), environ)) @@ -315,11 +314,11 @@ if '.' in key: # Extension, we don't care about its type continue - assert_(type(environ[key]) is StringType, + assert_(isinstance(environ[key], str), "Environmental variable %s is not a string: %r (value: %r)" % (key, type(environ[key]), environ[key])) - assert_(type(environ['wsgi.version']) is TupleType, + assert_(isinstance(environ['wsgi.version'], tuple), "wsgi.version should be a tuple (%r)" % (environ['wsgi.version'],)) assert_(environ['wsgi.url_scheme'] in ('http', 'https'), "wsgi.url_scheme unknown: %r" % environ['wsgi.url_scheme']) @@ -365,7 +364,7 @@ % (wsgi_errors, attr)) def check_status(status): - assert_(type(status) is StringType, + assert_(isinstance(status, str), "Status must be a string (not %r)" % status) # Implicitly check that we can turn it into an integer: status_code = status.split(None, 1)[0] @@ -380,12 +379,12 @@ % status, WSGIWarning) def check_headers(headers): - assert_(type(headers) is ListType, + assert_(isinstance(headers, list), "Headers (%r) must be of type list: %r" % (headers, type(headers))) header_names = {} for item in headers: - assert_(type(item) is TupleType, + assert_(isinstance(item, tuple), "Individual headers (%r) must be of type tuple: %r" % (item, type(item))) assert_(len(item) == 2) @@ -419,7 +418,7 @@ assert_(0, "No Content-Type header found in headers (%s)" % headers) def check_exc_info(exc_info): - assert_(exc_info is None or type(exc_info) is type(()), + assert_(exc_info is None or isinstance(exc_info, tuple), "exc_info (%r) is not a tuple: %r" % (exc_info, type(exc_info))) # More exc_info checks? Modified: python/branches/cpy_merge/Lib/xml/dom/domreg.py ============================================================================== --- python/branches/cpy_merge/Lib/xml/dom/domreg.py (original) +++ python/branches/cpy_merge/Lib/xml/dom/domreg.py Thu Jun 14 21:06:29 2007 @@ -72,7 +72,7 @@ for creator in well_known_implementations.keys(): try: dom = getDOMImplementation(name = creator) - except StandardError: # typically ImportError, or AttributeError + except Exception: # typically ImportError, or AttributeError continue if _good_enough(dom, features): return dom Modified: python/branches/cpy_merge/Lib/xml/sax/saxutils.py ============================================================================== --- python/branches/cpy_merge/Lib/xml/sax/saxutils.py (original) +++ python/branches/cpy_merge/Lib/xml/sax/saxutils.py Thu Jun 14 21:06:29 2007 @@ -3,15 +3,10 @@ convenience of application and driver writers. """ -import os, urlparse, urllib, types +import os, urlparse, urllib from . import handler from . import xmlreader -try: - _StringTypes = [types.StringType, types.UnicodeType] -except AttributeError: - _StringTypes = [types.StringType] - # See whether the xmlcharrefreplace error handler is # supported try: @@ -277,7 +272,7 @@ """This function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.""" - if type(source) in _StringTypes: + if isinstance(source, basestring): source = xmlreader.InputSource(source) elif hasattr(source, "read"): f = source Modified: python/branches/cpy_merge/Lib/xmlrpclib.py ============================================================================== --- python/branches/cpy_merge/Lib/xmlrpclib.py (original) +++ python/branches/cpy_merge/Lib/xmlrpclib.py Thu Jun 14 21:06:29 2007 @@ -138,8 +138,6 @@ import re, time, operator -from types import * - # -------------------------------------------------------------------- # Internal stuff @@ -304,7 +302,7 @@ """ def __init__(self, value=0): - if not isinstance(value, StringType): + if not isinstance(value, str): if datetime and isinstance(value, datetime.datetime): self.value = value.strftime("%Y%m%dT%H:%M:%S") return @@ -315,7 +313,7 @@ today = datetime.datetime.now().strftime("%Y%m%d") self.value = value.strftime(today+"T%H:%M:%S") return - if not isinstance(value, (TupleType, time.struct_time)): + if not isinstance(value, (tuple, time.struct_time)): if value == 0: value = time.time() value = time.localtime(value) @@ -592,7 +590,7 @@ if not self.allow_none: raise TypeError, "cannot marshal None unless allow_none is enabled" write("") - dispatch[NoneType] = dump_nil + dispatch[type(None)] = dump_nil def dump_int(self, value, write): # in case ints are > 32 bits @@ -601,7 +599,7 @@ write("") write(str(value)) write("\n") - dispatch[IntType] = dump_int + #dispatch[int] = dump_int if _bool_is_builtin: def dump_bool(self, value, write): @@ -616,19 +614,19 @@ write("") write(str(int(value))) write("\n") - dispatch[LongType] = dump_long + dispatch[int] = dump_long def dump_double(self, value, write): write("") write(repr(value)) write("\n") - dispatch[FloatType] = dump_double + dispatch[float] = dump_double def dump_string(self, value, write, escape=escape): write("") write(escape(value)) write("\n") - dispatch[StringType] = dump_string + dispatch[str] = dump_string if unicode: def dump_unicode(self, value, write, escape=escape): @@ -636,7 +634,7 @@ write("") write(escape(value)) write("\n") - dispatch[UnicodeType] = dump_unicode + dispatch[unicode] = dump_unicode def dump_array(self, value, write): i = id(value) @@ -649,8 +647,8 @@ dump(v, write) write("\n") del self.memo[i] - dispatch[TupleType] = dump_array - dispatch[ListType] = dump_array + dispatch[tuple] = dump_array + dispatch[list] = dump_array def dump_struct(self, value, write, escape=escape): i = id(value) @@ -661,8 +659,8 @@ write("\n") for k, v in value.items(): write("\n") - if type(k) is not StringType: - if unicode and type(k) is UnicodeType: + if not isinstance(k, str): + if unicode and isinstance(k, unicode): k = k.encode(self.encoding) else: raise TypeError, "dictionary key must be string" @@ -671,7 +669,7 @@ write("\n") write("\n") del self.memo[i] - dispatch[DictType] = dump_struct + dispatch[dict] = dump_struct if datetime: def dump_datetime(self, value, write): @@ -1019,12 +1017,10 @@ where necessary. """ - assert isinstance(params, TupleType) or isinstance(params, Fault),\ - "argument must be tuple or Fault instance" - + assert isinstance(params, (tuple, Fault)), "argument must be tuple or Fault instance" if isinstance(params, Fault): methodresponse = 1 - elif methodresponse and isinstance(params, TupleType): + elif methodresponse and isinstance(params, tuple): assert len(params) == 1, "response tuple must be a singleton" if not encoding: @@ -1045,7 +1041,7 @@ # standard XML-RPC wrappings if methodname: # a method call - if not isinstance(methodname, StringType): + if not isinstance(methodname, str): methodname = methodname.encode(encoding) data = ( xmlheader, @@ -1180,7 +1176,7 @@ def get_host_info(self, host): x509 = {} - if isinstance(host, TupleType): + if isinstance(host, tuple): host, x509 = host import urllib @@ -1230,7 +1226,7 @@ host, extra_headers, x509 = self.get_host_info(host) connection.putheader("Host", host) if extra_headers: - if isinstance(extra_headers, DictType): + if isinstance(extra_headers, dict): extra_headers = extra_headers.items() for key, value in extra_headers: connection.putheader(key, value) Modified: python/branches/cpy_merge/Misc/ACKS ============================================================================== --- python/branches/cpy_merge/Misc/ACKS (original) +++ python/branches/cpy_merge/Misc/ACKS Thu Jun 14 21:06:29 2007 @@ -159,6 +159,7 @@ Vincent Delft Erik Demaine Roger Dev +Raghuram Devarakonda Toby Dickenson Mark Dickinson Yves Dionne @@ -660,6 +661,7 @@ Roger Upole Michael Urman Hector Urtubia +Atul Varma Dmitry Vasiliev Frank Vercruesse Mike Verdone Modified: python/branches/cpy_merge/Misc/NEWS ============================================================================== --- python/branches/cpy_merge/Misc/NEWS (original) +++ python/branches/cpy_merge/Misc/NEWS Thu Jun 14 21:06:29 2007 @@ -26,6 +26,13 @@ Core and Builtins ----------------- +- Removed the __oct__ and __hex__ special methods and added a bin() + builtin function. + +- PEP 3127: octal literals now start with "0o". Old-style octal literals + are invalid. There are binary literals with a prefix of "0b". + This also affects int(x, 0). + - None, True, False are now keywords. - PEP 3119: isinstance() and issubclass() can be overridden. Modified: python/branches/cpy_merge/Misc/Vim/python.vim ============================================================================== --- python/branches/cpy_merge/Misc/Vim/python.vim (original) +++ python/branches/cpy_merge/Misc/Vim/python.vim Thu Jun 14 21:06:29 2007 @@ -88,7 +88,7 @@ syn keyword pythonException MemoryError NameError NotImplementedError syn keyword pythonException OSError OverflowError PendingDeprecationWarning syn keyword pythonException ReferenceError RuntimeError RuntimeWarning - syn keyword pythonException StandardError StopIteration SyntaxError + syn keyword pythonException StopIteration SyntaxError syn keyword pythonException SyntaxWarning SystemError SystemExit TabError syn keyword pythonException TypeError UnboundLocalError UnicodeDecodeError syn keyword pythonException UnicodeEncodeError UnicodeError Modified: python/branches/cpy_merge/Misc/build.sh ============================================================================== --- python/branches/cpy_merge/Misc/build.sh (original) +++ python/branches/cpy_merge/Misc/build.sh Thu Jun 14 21:06:29 2007 @@ -70,7 +70,7 @@ LEAKY_TESTS="test_(cmd_line|socket)" # These tests always fail, so skip them so we don't get false positives. -_ALWAYS_SKIP="test_compiler test_transformer" +_ALWAYS_SKIP="" ALWAYS_SKIP="-x $_ALWAYS_SKIP" # Skip these tests altogether when looking for leaks. These tests Modified: python/branches/cpy_merge/Misc/cheatsheet ============================================================================== --- python/branches/cpy_merge/Misc/cheatsheet (original) +++ python/branches/cpy_merge/Misc/cheatsheet Thu Jun 14 21:06:29 2007 @@ -779,8 +779,8 @@ class, the class name is printed, then a colon and a space, and finally the instance converted to a string using the built-in function str(). -All built-in exception classes derives from StandardError, itself -derived from Exception. +All built-in exception classes derives from Exception, itself +derived from BaseException. Name Space Statements @@ -1051,9 +1051,6 @@ On 'sys.exit()' StopIteration Signal the end from iterator.__next__() - StandardError - Base class for all built-in exceptions; derived from Exception - root class. ArithmeticError Base class for OverflowError, ZeroDivisionError, FloatingPointError Modified: python/branches/cpy_merge/Misc/python-mode.el ============================================================================== --- python/branches/cpy_merge/Misc/python-mode.el (original) +++ python/branches/cpy_merge/Misc/python-mode.el Thu Jun 14 21:06:29 2007 @@ -369,7 +369,7 @@ "NotImplementedError" "OSError" "OverflowError" "OverflowWarning" "PendingDeprecationWarning" "ReferenceError" "RuntimeError" "RuntimeWarning" - "StandardError" "StopIteration" "SyntaxError" + "StopIteration" "SyntaxError" "SyntaxWarning" "SystemError" "SystemExit" "TabError" "True" "TypeError" "UnboundLocalError" "UnicodeDecodeError" "UnicodeEncodeError" Modified: python/branches/cpy_merge/Misc/valgrind-python.supp ============================================================================== --- python/branches/cpy_merge/Misc/valgrind-python.supp (original) +++ python/branches/cpy_merge/Misc/valgrind-python.supp Thu Jun 14 21:06:29 2007 @@ -134,6 +134,15 @@ ### { + Generic ubuntu ld problems + Memcheck:Addr8 + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so + obj:/lib/ld-2.4.so +} + +{ Generic gentoo ld problems Memcheck:Cond obj:/lib/ld-2.3.4.so Modified: python/branches/cpy_merge/Modules/_bsddb.c ============================================================================== --- python/branches/cpy_merge/Modules/_bsddb.c (original) +++ python/branches/cpy_merge/Modules/_bsddb.c Thu Jun 14 21:06:29 2007 @@ -1713,6 +1713,7 @@ PyObject* dataobj; PyObject* retval = NULL; DBT key, data; + void *orig_data; DB_TXN *txn = NULL; static char* kwnames[] = { "key", "data", "txn", "flags", NULL }; @@ -1724,7 +1725,6 @@ CHECK_DB_NOT_CLOSED(self); if (!make_key_dbt(self, keyobj, &key, NULL)) return NULL; - CLEAR_DBT(data); if ( !make_dbt(dataobj, &data) || !checkTxnObj(txnobj, &txn) ) { @@ -1733,13 +1733,12 @@ } flags |= DB_GET_BOTH; + orig_data = data.data; if (CHECK_DBFLAG(self, DB_THREAD)) { /* Tell BerkeleyDB to malloc the return value (thread safe) */ + /* XXX(nnorwitz): At least 4.4.20 and 4.5.20 require this flag. */ data.flags = DB_DBT_MALLOC; - /* TODO: Is this flag needed? We're passing a data object that should - match what's in the DB, so there should be no need to malloc. - We run the risk of freeing something twice! Check this. */ } MYDB_BEGIN_ALLOW_THREADS; @@ -1753,8 +1752,13 @@ retval = Py_None; } else if (!err) { + /* XXX(nnorwitz): can we do: retval = dataobj; Py_INCREF(retval); */ retval = PyString_FromStringAndSize((char*)data.data, data.size); - FREE_DBT(data); /* Only if retrieval was successful */ + + /* Even though the flags require DB_DBT_MALLOC, data is not always + allocated. 4.4: allocated, 4.5: *not* allocated. :-( */ + if (data.data != orig_data) + FREE_DBT(data); } FREE_DBT(key); Modified: python/branches/cpy_merge/Modules/_ctypes/_ctypes.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/_ctypes.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/_ctypes.c Thu Jun 14 21:06:29 2007 @@ -789,7 +789,7 @@ CharArray_set_value(CDataObject *self, PyObject *value) { char *ptr; - int size; + Py_ssize_t size; if (PyUnicode_Check(value)) { value = PyUnicode_AsEncodedString(value, @@ -844,7 +844,7 @@ static int WCharArray_set_value(CDataObject *self, PyObject *value) { - int result = 0; + Py_ssize_t result = 0; if (PyString_Check(value)) { value = PyUnicode_FromEncodedObject(value, @@ -868,14 +868,12 @@ result = PyUnicode_AsWideChar((PyUnicodeObject *)value, (wchar_t *)self->b_ptr, self->b_size/sizeof(wchar_t)); - if (result >= 0 && (unsigned)result < self->b_size/sizeof(wchar_t)) + if (result >= 0 && (size_t)result < self->b_size/sizeof(wchar_t)) ((wchar_t *)self->b_ptr)[result] = (wchar_t)0; - if (result > 0) - result = 0; done: Py_DECREF(value); - return result; + return result >= 0 ? 0 : -1; } static PyGetSetDef WCharArray_getsets[] = { @@ -966,7 +964,7 @@ PyObject *typedict; int length; - int itemsize, itemalign; + Py_ssize_t itemsize, itemalign; typedict = PyTuple_GetItem(args, 2); if (!typedict) @@ -1737,8 +1735,8 @@ converters_from_argtypes(PyObject *ob) { PyObject *converters; - int i; - int nArgs; + Py_ssize_t i; + Py_ssize_t nArgs; ob = PySequence_Tuple(ob); /* new reference */ if (!ob) { @@ -1771,7 +1769,12 @@ Py_XDECREF(converters); Py_DECREF(ob); PyErr_Format(PyExc_TypeError, - "item %d in _argtypes_ has no from_param method", i+1); +#if (PY_VERSION_HEX < 0x02050000) + "item %d in _argtypes_ has no from_param method", +#else + "item %zd in _argtypes_ has no from_param method", +#endif + i+1); return NULL; } @@ -2591,18 +2594,18 @@ #ifdef MS_WIN32 static PPROC FindAddress(void *handle, char *name, PyObject *type) { +#ifdef MS_WIN64 + /* win64 has no stdcall calling conv, so it should + also not have the name mangling of it. + */ + return (PPROC)GetProcAddress(handle, name); +#else PPROC address; char *mangled_name; int i; StgDictObject *dict; address = (PPROC)GetProcAddress(handle, name); -#ifdef _WIN64 - /* win64 has no stdcall calling conv, so it should - also not have the name mangling of it. - */ - return address; -#else if (address) return address; if (((size_t)name & ~0xFFFF) == 0) { @@ -2634,7 +2637,7 @@ /* Return 1 if usable, 0 else and exception set. */ static int -_check_outarg_type(PyObject *arg, int index) +_check_outarg_type(PyObject *arg, Py_ssize_t index) { StgDictObject *dict; @@ -2655,7 +2658,7 @@ PyErr_Format(PyExc_TypeError, "'out' parameter %d must be a pointer type, not %s", - index, + Py_SAFE_DOWNCAST(index, Py_ssize_t, int), PyType_Check(arg) ? ((PyTypeObject *)arg)->tp_name : arg->ob_type->tp_name); @@ -2666,7 +2669,7 @@ static int _validate_paramflags(PyTypeObject *type, PyObject *paramflags) { - int i, len; + Py_ssize_t i, len; StgDictObject *dict; PyObject *argtypes; @@ -3051,12 +3054,12 @@ PyObject *paramflags = self->paramflags; PyObject *callargs; StgDictObject *dict; - int i, len; + Py_ssize_t i, len; int inargs_index = 0; /* It's a little bit difficult to determine how many arguments the function call requires/accepts. For simplicity, we count the consumed args and compare this to the number of supplied args. */ - int actual_args; + Py_ssize_t actual_args; *poutmask = 0; *pinoutmask = 0; @@ -3093,7 +3096,7 @@ /* This way seems to be ~2 us faster than the PyArg_ParseTuple calls below. */ /* We HAVE already checked that the tuple can be parsed with "i|zO", so... */ - int tsize = PyTuple_GET_SIZE(item); + Py_ssize_t tsize = PyTuple_GET_SIZE(item); flag = PyInt_AS_LONG(PyTuple_GET_ITEM(item, 0)); name = tsize > 1 ? PyString_AS_STRING(PyTuple_GET_ITEM(item, 1)) : NULL; defval = tsize > 2 ? PyTuple_GET_ITEM(item, 2) : NULL; @@ -3193,7 +3196,11 @@ message is misleading. See unittests/test_paramflags.py */ PyErr_Format(PyExc_TypeError, +#if (PY_VERSION_HEX < 0x02050000) "call takes exactly %d arguments (%d given)", +#else + "call takes exactly %d arguments (%zd given)", +#endif inargs_index, actual_args); goto error; } @@ -3339,8 +3346,10 @@ return NULL; if (converters) { - int required = PyTuple_GET_SIZE(converters); - int actual = PyTuple_GET_SIZE(callargs); + int required = Py_SAFE_DOWNCAST(PyTuple_GET_SIZE(converters), + Py_ssize_t, int); + int actual = Py_SAFE_DOWNCAST(PyTuple_GET_SIZE(callargs), + Py_ssize_t, int); if ((dict->flags & FUNCFLAG_CDECL) == FUNCFLAG_CDECL) { /* For cdecl functions, we allow more actual arguments @@ -3679,8 +3688,8 @@ static int Array_init(CDataObject *self, PyObject *args, PyObject *kw) { - int i; - int n; + Py_ssize_t i; + Py_ssize_t n; if (!PyTuple_Check(args)) { PyErr_SetString(PyExc_TypeError, @@ -3701,7 +3710,7 @@ Array_item(PyObject *_self, Py_ssize_t index) { CDataObject *self = (CDataObject *)_self; - int offset, size; + Py_ssize_t offset, size; StgDictObject *stgdict; @@ -3773,7 +3782,7 @@ Array_ass_item(PyObject *_self, Py_ssize_t index, PyObject *value) { CDataObject *self = (CDataObject *)_self; - int size, offset; + Py_ssize_t size, offset; StgDictObject *stgdict; char *ptr; @@ -3802,7 +3811,7 @@ Array_ass_slice(PyObject *_self, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *value) { CDataObject *self = (CDataObject *)_self; - int i, len; + Py_ssize_t i, len; if (value == NULL) { PyErr_SetString(PyExc_TypeError, @@ -4163,7 +4172,7 @@ Pointer_item(PyObject *_self, Py_ssize_t index) { CDataObject *self = (CDataObject *)_self; - int size; + Py_ssize_t size; Py_ssize_t offset; StgDictObject *stgdict, *itemdict; PyObject *proto; @@ -4194,7 +4203,7 @@ Pointer_ass_item(PyObject *_self, Py_ssize_t index, PyObject *value) { CDataObject *self = (CDataObject *)_self; - int size; + Py_ssize_t size; Py_ssize_t offset; StgDictObject *stgdict, *itemdict; PyObject *proto; @@ -4627,9 +4636,10 @@ static PyObject * wstring_at(const wchar_t *ptr, int size) { - if (size == -1) - size = wcslen(ptr); - return PyUnicode_FromWideChar(ptr, size); + Py_ssize_t ssize = size; + if (ssize == -1) + ssize = wcslen(ptr); + return PyUnicode_FromWideChar(ptr, ssize); } #endif @@ -4829,7 +4839,7 @@ return (PyObject *)unicode; } -int My_PyUnicode_AsWideChar(PyUnicodeObject *unicode, +Py_ssize_t My_PyUnicode_AsWideChar(PyUnicodeObject *unicode, register wchar_t *w, Py_ssize_t size) { Modified: python/branches/cpy_merge/Modules/_ctypes/callbacks.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/callbacks.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/callbacks.c Thu Jun 14 21:06:29 2007 @@ -124,10 +124,10 @@ PyObject *converters, void **pArgs) { - int i; + Py_ssize_t i; PyObject *result; PyObject *arglist = NULL; - int nArgs; + Py_ssize_t nArgs; #ifdef WITH_THREAD PyGILState_STATE state = PyGILState_Ensure(); #endif @@ -265,7 +265,7 @@ { int result; ffi_info *p; - int nArgs, i; + Py_ssize_t nArgs, i; ffi_abi cc; nArgs = PySequence_Size(converters); @@ -308,7 +308,8 @@ if (is_cdecl == 0) cc = FFI_STDCALL; #endif - result = ffi_prep_cif(&p->cif, cc, nArgs, + result = ffi_prep_cif(&p->cif, cc, + Py_SAFE_DOWNCAST(nArgs, Py_ssize_t, int), GetType(restype), &p->atypes[0]); if (result != FFI_OK) { Modified: python/branches/cpy_merge/Modules/_ctypes/callproc.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/callproc.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/callproc.c Thu Jun 14 21:06:29 2007 @@ -361,13 +361,13 @@ case 'z': case 'Z': case 'P': - sprintf(buffer, "", - self->tag, (long)self->value.p); + sprintf(buffer, "", + self->tag, self->value.p); break; default: - sprintf(buffer, "", - self->tag, (long)self); + sprintf(buffer, "", + self->tag, self); break; } return PyString_FromString(buffer); @@ -464,7 +464,7 @@ /* * Convert a single Python object into a PyCArgObject and return it. */ -static int ConvParam(PyObject *obj, int index, struct argument *pa) +static int ConvParam(PyObject *obj, Py_ssize_t index, struct argument *pa) { StgDictObject *dict; pa->keep = NULL; /* so we cannot forget it later */ @@ -566,7 +566,8 @@ return result; } PyErr_Format(PyExc_TypeError, - "Don't know how to convert parameter %d", index); + "Don't know how to convert parameter %d", + Py_SAFE_DOWNCAST(index, Py_ssize_t, int)); return -1; } } @@ -906,7 +907,7 @@ PyObject *restype, PyObject *checker) { - int i, n, argcount, argtype_count; + Py_ssize_t i, n, argcount, argtype_count; void *resbuf; struct argument *args, *pa; ffi_type **atypes; @@ -996,7 +997,10 @@ } if (-1 == _call_function_pointer(flags, pProc, avalues, atypes, - rtype, resbuf, argcount)) + rtype, resbuf, + Py_SAFE_DOWNCAST(argcount, + Py_ssize_t, + int))) goto cleanup; #ifdef WORDS_BIGENDIAN @@ -1036,6 +1040,15 @@ return retval; } +static int +_parse_voidp(PyObject *obj, void **address) +{ + *address = PyLong_AsVoidPtr(obj); + if (*address == NULL) + return 0; + return 1; +} + #ifdef MS_WIN32 #ifdef _UNICODE @@ -1123,7 +1136,7 @@ static PyObject *free_library(PyObject *self, PyObject *args) { void *hMod; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":FreeLibrary", &hMod)) + if (!PyArg_ParseTuple(args, "O&:FreeLibrary", &_parse_voidp, &hMod)) return NULL; if (!FreeLibrary((HMODULE)hMod)) return PyErr_SetFromWindowsErr(GetLastError()); @@ -1246,7 +1259,7 @@ { void *handle; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":dlclose", &handle)) + if (!PyArg_ParseTuple(args, "O&:dlclose", &_parse_voidp, &handle)) return NULL; if (dlclose(handle)) { PyErr_SetString(PyExc_OSError, @@ -1263,7 +1276,8 @@ void *handle; void *ptr; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE "s:dlsym", &handle, &name)) + if (!PyArg_ParseTuple(args, "O&s:dlsym", + &_parse_voidp, &handle, &name)) return NULL; ptr = ctypes_dlsym((void*)handle, name); if (!ptr) { @@ -1288,8 +1302,8 @@ PyObject *result; if (!PyArg_ParseTuple(args, - PY_VOID_P_CODE "O!", - &func, + "O&O!", + &_parse_voidp, &func, &PyTuple_Type, &arguments)) return NULL; @@ -1319,8 +1333,8 @@ PyObject *result; if (!PyArg_ParseTuple(args, - PY_VOID_P_CODE "O!", - &func, + "O&O!", + &_parse_voidp, &func, &PyTuple_Type, &arguments)) return NULL; @@ -1352,10 +1366,10 @@ dict = PyType_stgdict(obj); if (dict) - return PyInt_FromLong(dict->size); + return PyInt_FromSsize_t(dict->size); if (CDataObject_Check(obj)) - return PyInt_FromLong(((CDataObject *)obj)->b_size); + return PyInt_FromSsize_t(((CDataObject *)obj)->b_size); PyErr_SetString(PyExc_TypeError, "this type has no size"); return NULL; @@ -1373,11 +1387,11 @@ dict = PyType_stgdict(obj); if (dict) - return PyInt_FromLong(dict->align); + return PyInt_FromSsize_t(dict->align); dict = PyObject_stgdict(obj); if (dict) - return PyInt_FromLong(dict->align); + return PyInt_FromSsize_t(dict->align); PyErr_SetString(PyExc_TypeError, "no alignment info"); Modified: python/branches/cpy_merge/Modules/_ctypes/cfield.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/cfield.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/cfield.c Thu Jun 14 21:06:29 2007 @@ -35,14 +35,14 @@ * prev_desc points to the type of the previous bitfield, if any. */ PyObject * -CField_FromDesc(PyObject *desc, int index, - int *pfield_size, int bitsize, int *pbitofs, - int *psize, int *poffset, int *palign, +CField_FromDesc(PyObject *desc, Py_ssize_t index, + Py_ssize_t *pfield_size, int bitsize, int *pbitofs, + Py_ssize_t *psize, Py_ssize_t *poffset, Py_ssize_t *palign, int pack, int big_endian) { CFieldObject *self; PyObject *proto; - int size, align, length; + Py_ssize_t size, align, length; SETFUNC setfunc = NULL; GETFUNC getfunc = NULL; StgDictObject *dict; @@ -147,7 +147,7 @@ else align = dict->align; if (align && *poffset % align) { - int delta = align - (*poffset % align); + Py_ssize_t delta = align - (*poffset % align); *psize += delta; *poffset += delta; } @@ -220,21 +220,13 @@ static PyObject * CField_get_offset(PyObject *self, void *data) { -#if (PY_VERSION_HEX < 0x02050000) - return PyInt_FromLong(((CFieldObject *)self)->offset); -#else return PyInt_FromSsize_t(((CFieldObject *)self)->offset); -#endif } static PyObject * CField_get_size(PyObject *self, void *data) { -#if (PY_VERSION_HEX < 0x02050000) - return PyInt_FromLong(((CFieldObject *)self)->size); -#else return PyInt_FromSsize_t(((CFieldObject *)self)->size); -#endif } static PyGetSetDef CField_getset[] = { @@ -268,8 +260,8 @@ CField_repr(CFieldObject *self) { PyObject *result; - int bits = self->size >> 16; - int size = self->size & 0xFFFF; + Py_ssize_t bits = self->size >> 16; + Py_ssize_t size = self->size & 0xFFFF; const char *name; name = ((PyTypeObject *)self->proto)->tp_name; @@ -279,7 +271,7 @@ #if (PY_VERSION_HEX < 0x02050000) "", #else - "", + "", #endif name, self->offset, size, bits); else @@ -287,7 +279,7 @@ #if (PY_VERSION_HEX < 0x02050000) "", #else - "", + "", #endif name, self->offset, size); return result; @@ -519,7 +511,7 @@ */ static PyObject * -b_set(void *ptr, PyObject *value, unsigned size) +b_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; if (get_long(value, &val) < 0) @@ -530,7 +522,7 @@ static PyObject * -b_get(void *ptr, unsigned size) +b_get(void *ptr, Py_ssize_t size) { signed char val = *(signed char *)ptr; GET_BITFIELD(val, size); @@ -538,7 +530,7 @@ } static PyObject * -B_set(void *ptr, PyObject *value, unsigned size) +B_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; if (get_ulong(value, &val) < 0) @@ -550,7 +542,7 @@ static PyObject * -B_get(void *ptr, unsigned size) +B_get(void *ptr, Py_ssize_t size) { unsigned char val = *(unsigned char *)ptr; GET_BITFIELD(val, size); @@ -558,7 +550,7 @@ } static PyObject * -h_set(void *ptr, PyObject *value, unsigned size) +h_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; short x; @@ -572,7 +564,7 @@ static PyObject * -h_set_sw(void *ptr, PyObject *value, unsigned size) +h_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; short field; @@ -587,7 +579,7 @@ } static PyObject * -h_get(void *ptr, unsigned size) +h_get(void *ptr, Py_ssize_t size) { short val; memcpy(&val, ptr, sizeof(val)); @@ -596,7 +588,7 @@ } static PyObject * -h_get_sw(void *ptr, unsigned size) +h_get_sw(void *ptr, Py_ssize_t size) { short val; memcpy(&val, ptr, sizeof(val)); @@ -606,7 +598,7 @@ } static PyObject * -H_set(void *ptr, PyObject *value, unsigned size) +H_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned short x; @@ -619,7 +611,7 @@ } static PyObject * -H_set_sw(void *ptr, PyObject *value, unsigned size) +H_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned short field; @@ -635,7 +627,7 @@ static PyObject * -H_get(void *ptr, unsigned size) +H_get(void *ptr, Py_ssize_t size) { unsigned short val; memcpy(&val, ptr, sizeof(val)); @@ -644,7 +636,7 @@ } static PyObject * -H_get_sw(void *ptr, unsigned size) +H_get_sw(void *ptr, Py_ssize_t size) { unsigned short val; memcpy(&val, ptr, sizeof(val)); @@ -654,7 +646,7 @@ } static PyObject * -i_set(void *ptr, PyObject *value, unsigned size) +i_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; int x; @@ -667,7 +659,7 @@ } static PyObject * -i_set_sw(void *ptr, PyObject *value, unsigned size) +i_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; int field; @@ -683,7 +675,7 @@ static PyObject * -i_get(void *ptr, unsigned size) +i_get(void *ptr, Py_ssize_t size) { int val; memcpy(&val, ptr, sizeof(val)); @@ -692,7 +684,7 @@ } static PyObject * -i_get_sw(void *ptr, unsigned size) +i_get_sw(void *ptr, Py_ssize_t size) { int val; memcpy(&val, ptr, sizeof(val)); @@ -704,7 +696,7 @@ #ifdef MS_WIN32 /* short BOOL - VARIANT_BOOL */ static PyObject * -vBOOL_set(void *ptr, PyObject *value, unsigned size) +vBOOL_set(void *ptr, PyObject *value, Py_ssize_t size) { switch (PyObject_IsTrue(value)) { case -1: @@ -719,7 +711,7 @@ } static PyObject * -vBOOL_get(void *ptr, unsigned size) +vBOOL_get(void *ptr, Py_ssize_t size) { return PyBool_FromLong((long)*(short int *)ptr); } @@ -734,7 +726,7 @@ #endif static PyObject * -t_set(void *ptr, PyObject *value, unsigned size) +t_set(void *ptr, PyObject *value, Py_ssize_t size) { switch (PyObject_IsTrue(value)) { case -1: @@ -749,13 +741,13 @@ } static PyObject * -t_get(void *ptr, unsigned size) +t_get(void *ptr, Py_ssize_t size) { return PyBool_FromLong((long)*(BOOL_TYPE *)ptr); } static PyObject * -I_set(void *ptr, PyObject *value, unsigned size) +I_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned int x; @@ -768,7 +760,7 @@ } static PyObject * -I_set_sw(void *ptr, PyObject *value, unsigned size) +I_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned int field; @@ -783,7 +775,7 @@ static PyObject * -I_get(void *ptr, unsigned size) +I_get(void *ptr, Py_ssize_t size) { unsigned int val; memcpy(&val, ptr, sizeof(val)); @@ -792,7 +784,7 @@ } static PyObject * -I_get_sw(void *ptr, unsigned size) +I_get_sw(void *ptr, Py_ssize_t size) { unsigned int val; memcpy(&val, ptr, sizeof(val)); @@ -802,7 +794,7 @@ } static PyObject * -l_set(void *ptr, PyObject *value, unsigned size) +l_set(void *ptr, PyObject *value, Py_ssize_t size) { long val; long x; @@ -815,7 +807,7 @@ } static PyObject * -l_set_sw(void *ptr, PyObject *value, unsigned size) +l_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { long val; long field; @@ -831,7 +823,7 @@ static PyObject * -l_get(void *ptr, unsigned size) +l_get(void *ptr, Py_ssize_t size) { long val; memcpy(&val, ptr, sizeof(val)); @@ -840,7 +832,7 @@ } static PyObject * -l_get_sw(void *ptr, unsigned size) +l_get_sw(void *ptr, Py_ssize_t size) { long val; memcpy(&val, ptr, sizeof(val)); @@ -850,7 +842,7 @@ } static PyObject * -L_set(void *ptr, PyObject *value, unsigned size) +L_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned long x; @@ -863,7 +855,7 @@ } static PyObject * -L_set_sw(void *ptr, PyObject *value, unsigned size) +L_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned long val; unsigned long field; @@ -879,7 +871,7 @@ static PyObject * -L_get(void *ptr, unsigned size) +L_get(void *ptr, Py_ssize_t size) { unsigned long val; memcpy(&val, ptr, sizeof(val)); @@ -888,7 +880,7 @@ } static PyObject * -L_get_sw(void *ptr, unsigned size) +L_get_sw(void *ptr, Py_ssize_t size) { unsigned long val; memcpy(&val, ptr, sizeof(val)); @@ -899,7 +891,7 @@ #ifdef HAVE_LONG_LONG static PyObject * -q_set(void *ptr, PyObject *value, unsigned size) +q_set(void *ptr, PyObject *value, Py_ssize_t size) { PY_LONG_LONG val; PY_LONG_LONG x; @@ -912,7 +904,7 @@ } static PyObject * -q_set_sw(void *ptr, PyObject *value, unsigned size) +q_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { PY_LONG_LONG val; PY_LONG_LONG field; @@ -927,7 +919,7 @@ } static PyObject * -q_get(void *ptr, unsigned size) +q_get(void *ptr, Py_ssize_t size) { PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -936,7 +928,7 @@ } static PyObject * -q_get_sw(void *ptr, unsigned size) +q_get_sw(void *ptr, Py_ssize_t size) { PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -946,7 +938,7 @@ } static PyObject * -Q_set(void *ptr, PyObject *value, unsigned size) +Q_set(void *ptr, PyObject *value, Py_ssize_t size) { unsigned PY_LONG_LONG val; unsigned PY_LONG_LONG x; @@ -959,7 +951,7 @@ } static PyObject * -Q_set_sw(void *ptr, PyObject *value, unsigned size) +Q_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { unsigned PY_LONG_LONG val; unsigned PY_LONG_LONG field; @@ -974,7 +966,7 @@ } static PyObject * -Q_get(void *ptr, unsigned size) +Q_get(void *ptr, Py_ssize_t size) { unsigned PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -983,7 +975,7 @@ } static PyObject * -Q_get_sw(void *ptr, unsigned size) +Q_get_sw(void *ptr, Py_ssize_t size) { unsigned PY_LONG_LONG val; memcpy(&val, ptr, sizeof(val)); @@ -1000,7 +992,7 @@ static PyObject * -d_set(void *ptr, PyObject *value, unsigned size) +d_set(void *ptr, PyObject *value, Py_ssize_t size) { double x; @@ -1016,7 +1008,7 @@ } static PyObject * -d_get(void *ptr, unsigned size) +d_get(void *ptr, Py_ssize_t size) { double val; memcpy(&val, ptr, sizeof(val)); @@ -1024,7 +1016,7 @@ } static PyObject * -d_set_sw(void *ptr, PyObject *value, unsigned size) +d_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { double x; @@ -1046,7 +1038,7 @@ } static PyObject * -d_get_sw(void *ptr, unsigned size) +d_get_sw(void *ptr, Py_ssize_t size) { #ifdef WORDS_BIGENDIAN return PyFloat_FromDouble(_PyFloat_Unpack8(ptr, 1)); @@ -1056,7 +1048,7 @@ } static PyObject * -f_set(void *ptr, PyObject *value, unsigned size) +f_set(void *ptr, PyObject *value, Py_ssize_t size) { float x; @@ -1072,7 +1064,7 @@ } static PyObject * -f_get(void *ptr, unsigned size) +f_get(void *ptr, Py_ssize_t size) { float val; memcpy(&val, ptr, sizeof(val)); @@ -1080,7 +1072,7 @@ } static PyObject * -f_set_sw(void *ptr, PyObject *value, unsigned size) +f_set_sw(void *ptr, PyObject *value, Py_ssize_t size) { float x; @@ -1102,7 +1094,7 @@ } static PyObject * -f_get_sw(void *ptr, unsigned size) +f_get_sw(void *ptr, Py_ssize_t size) { #ifdef WORDS_BIGENDIAN return PyFloat_FromDouble(_PyFloat_Unpack4(ptr, 1)); @@ -1122,7 +1114,7 @@ Py_DECREF on destruction. Maybe only when b_needsfree is non-zero. */ static PyObject * -O_get(void *ptr, unsigned size) +O_get(void *ptr, Py_ssize_t size) { PyObject *ob = *(PyObject **)ptr; if (ob == NULL) { @@ -1137,7 +1129,7 @@ } static PyObject * -O_set(void *ptr, PyObject *value, unsigned size) +O_set(void *ptr, PyObject *value, Py_ssize_t size) { /* Hm, does the memory block need it's own refcount or not? */ *(PyObject **)ptr = value; @@ -1147,7 +1139,7 @@ static PyObject * -c_set(void *ptr, PyObject *value, unsigned size) +c_set(void *ptr, PyObject *value, Py_ssize_t size) { if (!PyString_Check(value) || (1 != PyString_Size(value))) { PyErr_Format(PyExc_TypeError, @@ -1160,7 +1152,7 @@ static PyObject * -c_get(void *ptr, unsigned size) +c_get(void *ptr, Py_ssize_t size) { return PyString_FromStringAndSize((char *)ptr, 1); } @@ -1168,9 +1160,9 @@ #ifdef CTYPES_UNICODE /* u - a single wchar_t character */ static PyObject * -u_set(void *ptr, PyObject *value, unsigned size) +u_set(void *ptr, PyObject *value, Py_ssize_t size) { - int len; + Py_ssize_t len; if (PyString_Check(value)) { value = PyUnicode_FromEncodedObject(value, @@ -1202,17 +1194,17 @@ static PyObject * -u_get(void *ptr, unsigned size) +u_get(void *ptr, Py_ssize_t size) { return PyUnicode_FromWideChar((wchar_t *)ptr, 1); } /* U - a unicode string */ static PyObject * -U_get(void *ptr, unsigned size) +U_get(void *ptr, Py_ssize_t size) { PyObject *result; - unsigned int len; + Py_ssize_t len; Py_UNICODE *p; size /= sizeof(wchar_t); /* we count character units here, not bytes */ @@ -1240,9 +1232,9 @@ } static PyObject * -U_set(void *ptr, PyObject *value, unsigned length) +U_set(void *ptr, PyObject *value, Py_ssize_t length) { - unsigned int size; + Py_ssize_t size; /* It's easier to calculate in characters than in bytes */ length /= sizeof(wchar_t); @@ -1263,7 +1255,11 @@ size = PyUnicode_GET_SIZE(value); if (size > length) { PyErr_Format(PyExc_ValueError, +#if (PY_VERSION_HEX < 0x02050000) "string too long (%d, maximum length %d)", +#else + "string too long (%zd, maximum length %zd)", +#endif size, length); Py_DECREF(value); return NULL; @@ -1277,9 +1273,10 @@ #endif static PyObject * -s_get(void *ptr, unsigned size) +s_get(void *ptr, Py_ssize_t size) { PyObject *result; + size_t slen; result = PyString_FromString((char *)ptr); if (!result) @@ -1287,7 +1284,8 @@ /* chop off at the first NUL character, if any. * On error, result will be deallocated and set to NULL. */ - size = min(size, strlen(PyString_AS_STRING(result))); + slen = strlen(PyString_AS_STRING(result)); + size = min(size, (Py_ssize_t)slen); if (result->ob_refcnt == 1) { /* shorten the result */ _PyString_Resize(&result, size); @@ -1298,10 +1296,10 @@ } static PyObject * -s_set(void *ptr, PyObject *value, unsigned length) +s_set(void *ptr, PyObject *value, Py_ssize_t length) { char *data; - unsigned size; + Py_ssize_t size; data = PyString_AsString(value); if (!data) @@ -1314,7 +1312,11 @@ ++size; } else if (size > length) { PyErr_Format(PyExc_ValueError, +#if (PY_VERSION_HEX < 0x02050000) "string too long (%d, maximum length %d)", +#else + "string too long (%zd, maximum length %zd)", +#endif size, length); return NULL; } @@ -1324,7 +1326,7 @@ } static PyObject * -z_set(void *ptr, PyObject *value, unsigned size) +z_set(void *ptr, PyObject *value, Py_ssize_t size) { if (value == Py_None) { *(char **)ptr = NULL; @@ -1358,7 +1360,7 @@ } static PyObject * -z_get(void *ptr, unsigned size) +z_get(void *ptr, Py_ssize_t size) { /* XXX What about invalid pointers ??? */ if (*(void **)ptr) { @@ -1379,7 +1381,7 @@ #ifdef CTYPES_UNICODE static PyObject * -Z_set(void *ptr, PyObject *value, unsigned size) +Z_set(void *ptr, PyObject *value, Py_ssize_t size) { if (value == Py_None) { *(wchar_t **)ptr = NULL; @@ -1447,7 +1449,7 @@ } static PyObject * -Z_get(void *ptr, unsigned size) +Z_get(void *ptr, Py_ssize_t size) { wchar_t *p; p = *(wchar_t **)ptr; @@ -1470,7 +1472,7 @@ #ifdef MS_WIN32 static PyObject * -BSTR_set(void *ptr, PyObject *value, unsigned size) +BSTR_set(void *ptr, PyObject *value, Py_ssize_t size) { BSTR bstr; @@ -1494,8 +1496,13 @@ /* create a BSTR from value */ if (value) { + Py_ssize_t size = PyUnicode_GET_SIZE(value); + if ((unsigned) size != size) { + PyErr_SetString(PyExc_ValueError, "String too long for BSTR"); + return NULL; + } bstr = SysAllocStringLen(PyUnicode_AS_UNICODE(value), - PyUnicode_GET_SIZE(value)); + (unsigned)size); Py_DECREF(value); } else bstr = NULL; @@ -1513,7 +1520,7 @@ static PyObject * -BSTR_get(void *ptr, unsigned size) +BSTR_get(void *ptr, Py_ssize_t size) { BSTR p; p = *(BSTR *)ptr; @@ -1530,7 +1537,7 @@ #endif static PyObject * -P_set(void *ptr, PyObject *value, unsigned size) +P_set(void *ptr, PyObject *value, Py_ssize_t size) { void *v; if (value == Py_None) { @@ -1563,7 +1570,7 @@ } static PyObject * -P_get(void *ptr, unsigned size) +P_get(void *ptr, Py_ssize_t size) { if (*(void **)ptr == NULL) { Py_INCREF(Py_None); Modified: python/branches/cpy_merge/Modules/_ctypes/ctypes.h ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/ctypes.h (original) +++ python/branches/cpy_merge/Modules/_ctypes/ctypes.h Thu Jun 14 21:06:29 2007 @@ -4,6 +4,7 @@ #if (PY_VERSION_HEX < 0x02050000) typedef int Py_ssize_t; +#define PyInt_FromSsize_t PyInt_FromLong #endif #ifndef MS_WIN32 @@ -23,16 +24,10 @@ #define PY_LONG_LONG LONG_LONG #endif -#if SIZEOF_VOID_P == SIZEOF_LONG -#define PY_VOID_P_CODE "k" -#elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P == SIZEOF_LONG_LONG) -#define PY_VOID_P_CODE "K" -#endif - typedef struct tagPyCArgObject PyCArgObject; typedef struct tagCDataObject CDataObject; -typedef PyObject *(* GETFUNC)(void *, unsigned size); -typedef PyObject *(* SETFUNC)(void *, PyObject *value, unsigned size); +typedef PyObject *(* GETFUNC)(void *, Py_ssize_t size); +typedef PyObject *(* SETFUNC)(void *, PyObject *value, Py_ssize_t size); typedef PyCArgObject *(* PARAMFUNC)(CDataObject *obj); /* A default buffer in CDataObject, which can be used for small C types. If @@ -137,9 +132,9 @@ extern PyObject * -CField_FromDesc(PyObject *desc, int index, - int *pfield_size, int bitsize, int *pbitofs, - int *psize, int *poffset, int *palign, +CField_FromDesc(PyObject *desc, Py_ssize_t index, + Py_ssize_t *pfield_size, int bitsize, int *pbitofs, + Py_ssize_t *psize, Py_ssize_t *poffset, Py_ssize_t *palign, int pack, int is_big_endian); extern PyObject *CData_AtAddress(PyObject *type, void *buf); @@ -310,7 +305,7 @@ void *p; } value; PyObject *obj; - int size; /* for the 'V' tag */ + Py_ssize_t size; /* for the 'V' tag */ }; extern PyTypeObject PyCArg_Type; @@ -387,7 +382,7 @@ # define PyUnicode_AsWideChar My_PyUnicode_AsWideChar extern PyObject *My_PyUnicode_FromWideChar(const wchar_t *, Py_ssize_t); -extern int My_PyUnicode_AsWideChar(PyUnicodeObject *, wchar_t *, Py_ssize_t); +extern Py_ssize_t My_PyUnicode_AsWideChar(PyUnicodeObject *, wchar_t *, Py_ssize_t); #endif Modified: python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi.c Thu Jun 14 21:06:29 2007 @@ -174,7 +174,7 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); /*@=declundef@*/ /*@=exportheader@*/ @@ -185,13 +185,13 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); /*@=declundef@*/ /*@=exportheader@*/ #endif /* X86_WIN32 */ void ffi_call(/*@dependent@*/ ffi_cif *cif, - void (*fn)(), + void (*fn)(void), /*@out@*/ void *rvalue, /*@dependent@*/ void **avalue) { @@ -405,7 +405,7 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); #ifdef X86_WIN32 extern void @@ -413,12 +413,12 @@ /*@out@*/ extended_cif *, unsigned, unsigned, /*@out@*/ unsigned *, - void (*fn)()); + void (*fn)(void)); #endif /* X86_WIN32 */ void ffi_raw_call(/*@dependent@*/ ffi_cif *cif, - void (*fn)(), + void (*fn)(void), /*@out@*/ void *rvalue, /*@dependent@*/ ffi_raw *fake_avalue) { Modified: python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi64.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi64.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/libffi/src/x86/ffi64.c Thu Jun 14 21:06:29 2007 @@ -42,7 +42,7 @@ }; extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags, - void *raddr, void (*fnaddr)(), unsigned ssecount); + void *raddr, void (*fnaddr)(void), unsigned ssecount); /* All reference to register classes here is identical to the code in gcc/config/i386/i386.c. Do *not* change one without the other. */ @@ -339,7 +339,7 @@ } void -ffi_call (ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) +ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) { enum x86_64_reg_class classes[MAX_CLASSES]; char *stack, *argp; Modified: python/branches/cpy_merge/Modules/_ctypes/stgdict.c ============================================================================== --- python/branches/cpy_merge/Modules/_ctypes/stgdict.c (original) +++ python/branches/cpy_merge/Modules/_ctypes/stgdict.c Thu Jun 14 21:06:29 2007 @@ -50,7 +50,7 @@ StgDict_clone(StgDictObject *dst, StgDictObject *src) { char *d, *s; - int size; + Py_ssize_t size; StgDict_clear(dst); PyMem_Free(dst->ffi_type_pointer.elements); @@ -285,13 +285,13 @@ StructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct) { StgDictObject *stgdict, *basedict; - int len, offset, size, align, i; - int union_size, total_align; - int field_size = 0; + Py_ssize_t len, offset, size, align, i; + Py_ssize_t union_size, total_align; + Py_ssize_t field_size = 0; int bitofs; PyObject *isPacked; int pack = 0; - int ffi_ofs; + Py_ssize_t ffi_ofs; int big_endian; /* HACK Alert: I cannot be bothered to fix ctypes.com, so there has to @@ -402,7 +402,11 @@ if (dict == NULL) { Py_DECREF(pair); PyErr_Format(PyExc_TypeError, +#if (PY_VERSION_HEX < 0x02050000) "second item in _fields_ tuple (index %d) must be a C type", +#else + "second item in _fields_ tuple (index %zd) must be a C type", +#endif i); return -1; } @@ -480,7 +484,9 @@ /* Adjust the size according to the alignment requirements */ size = ((size + total_align - 1) / total_align) * total_align; - stgdict->ffi_type_pointer.alignment = total_align; + stgdict->ffi_type_pointer.alignment = Py_SAFE_DOWNCAST(total_align, + Py_ssize_t, + unsigned short); stgdict->ffi_type_pointer.size = size; stgdict->size = size; Modified: python/branches/cpy_merge/Modules/_sqlite/cache.c ============================================================================== --- python/branches/cpy_merge/Modules/_sqlite/cache.c (original) +++ python/branches/cpy_merge/Modules/_sqlite/cache.c Thu Jun 14 21:06:29 2007 @@ -243,6 +243,7 @@ } template = PyString_FromString("%s <- %s ->%s\n"); if (!template) { + Py_DECREF(fmt_args); return NULL; } display_str = PyString_Format(template, fmt_args); Modified: python/branches/cpy_merge/Modules/_sqlite/module.c ============================================================================== --- python/branches/cpy_merge/Modules/_sqlite/module.c (original) +++ python/branches/cpy_merge/Modules/_sqlite/module.c Thu Jun 14 21:06:29 2007 @@ -287,12 +287,12 @@ /*** Create DB-API Exception hierarchy */ - if (!(pysqlite_Error = PyErr_NewException(MODULE_NAME ".Error", PyExc_StandardError, NULL))) { + if (!(pysqlite_Error = PyErr_NewException(MODULE_NAME ".Error", PyExc_Exception, NULL))) { goto error; } PyDict_SetItemString(dict, "Error", pysqlite_Error); - if (!(pysqlite_Warning = PyErr_NewException(MODULE_NAME ".Warning", PyExc_StandardError, NULL))) { + if (!(pysqlite_Warning = PyErr_NewException(MODULE_NAME ".Warning", PyExc_Exception, NULL))) { goto error; } PyDict_SetItemString(dict, "Warning", pysqlite_Warning); Modified: python/branches/cpy_merge/Modules/_testcapimodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_testcapimodule.c (original) +++ python/branches/cpy_merge/Modules/_testcapimodule.c Thu Jun 14 21:06:29 2007 @@ -728,7 +728,7 @@ e->tv_sec -=1; e->tv_usec += 1000000; } - printf("Test %d: %d.%06ds\n", test, (int)e->tv_sec, e->tv_usec); + printf("Test %d: %d.%06ds\n", test, (int)e->tv_sec, (int)e->tv_usec); } static PyObject * @@ -888,6 +888,10 @@ unsigned long ulong_member; float float_member; double double_member; +#ifdef HAVE_LONG_LONG + PY_LONG_LONG longlong_member; + unsigned PY_LONG_LONG ulonglong_member; +#endif } all_structmembers; typedef struct { @@ -906,23 +910,40 @@ {"T_ULONG", T_ULONG, offsetof(test_structmembers, structmembers.ulong_member), 0, NULL}, {"T_FLOAT", T_FLOAT, offsetof(test_structmembers, structmembers.float_member), 0, NULL}, {"T_DOUBLE", T_DOUBLE, offsetof(test_structmembers, structmembers.double_member), 0, NULL}, +#ifdef HAVE_LONG_LONG + {"T_LONGLONG", T_LONGLONG, offsetof(test_structmembers, structmembers.longlong_member), 0, NULL}, + {"T_ULONGLONG", T_ULONGLONG, offsetof(test_structmembers, structmembers.ulonglong_member), 0, NULL}, +#endif {NULL} }; static PyObject *test_structmembers_new(PyTypeObject *type, PyObject *args, PyObject *kwargs){ static char *keywords[]={"T_BYTE", "T_UBYTE", "T_SHORT", "T_USHORT", "T_INT", "T_UINT", - "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", NULL}; + "T_LONG", "T_ULONG", "T_FLOAT", "T_DOUBLE", + #ifdef HAVE_LONG_LONG + "T_LONGLONG", "T_ULONGLONG", + #endif + NULL}; + static char *fmt="|bBhHiIlkfd" + #ifdef HAVE_LONG_LONG + "LK" + #endif + ; test_structmembers *ob=PyObject_New(test_structmembers, type); if (ob==NULL) return NULL; memset(&ob->structmembers, 0, sizeof(all_structmembers)); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|bBhHiIlkfd", keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, fmt, keywords, &ob->structmembers.byte_member, &ob->structmembers.ubyte_member, &ob->structmembers.short_member, &ob->structmembers.ushort_member, &ob->structmembers.int_member, &ob->structmembers.uint_member, &ob->structmembers.long_member, &ob->structmembers.ulong_member, - &ob->structmembers.float_member, &ob->structmembers.double_member)){ + &ob->structmembers.float_member, &ob->structmembers.double_member + #ifdef HAVE_LONG_LONG + ,&ob->structmembers.longlong_member, &ob->structmembers.ulonglong_member + #endif + )){ Py_DECREF(ob); return NULL; } @@ -1005,6 +1026,9 @@ PyModule_AddObject(m, "FLT_MIN", PyFloat_FromDouble(FLT_MIN)); PyModule_AddObject(m, "DBL_MAX", PyFloat_FromDouble(DBL_MAX)); PyModule_AddObject(m, "DBL_MIN", PyFloat_FromDouble(DBL_MIN)); + PyModule_AddObject(m, "LLONG_MAX", PyLong_FromLongLong(PY_LLONG_MAX)); + PyModule_AddObject(m, "LLONG_MIN", PyLong_FromLongLong(PY_LLONG_MIN)); + PyModule_AddObject(m, "ULLONG_MAX", PyLong_FromUnsignedLongLong(PY_ULLONG_MAX)); PyModule_AddObject(m, "PY_SSIZE_T_MAX", PyInt_FromSsize_t(PY_SSIZE_T_MAX)); PyModule_AddObject(m, "PY_SSIZE_T_MIN", PyInt_FromSsize_t(PY_SSIZE_T_MIN)); Modified: python/branches/cpy_merge/Modules/cjkcodecs/multibytecodec.c ============================================================================== --- python/branches/cpy_merge/Modules/cjkcodecs/multibytecodec.c (original) +++ python/branches/cpy_merge/Modules/cjkcodecs/multibytecodec.c Thu Jun 14 21:06:29 2007 @@ -1214,6 +1214,8 @@ cres = NULL; for (;;) { + int endoffile; + if (sizehint < 0) cres = PyObject_CallMethod(self->stream, (char *)method, NULL); @@ -1230,6 +1232,8 @@ goto errorexit; } + endoffile = (PyString_GET_SIZE(cres) == 0); + if (self->pendingsize > 0) { PyObject *ctr; char *ctrdata; @@ -1257,7 +1261,7 @@ (MultibyteStatefulDecoderContext *)self, &buf)) goto errorexit; - if (rsize == 0 || sizehint < 0) { /* end of file */ + if (endoffile || sizehint < 0) { if (buf.inbuf < buf.inbuf_end && multibytecodec_decerror(self->codec, &self->state, &buf, self->errors, MBERR_TOOFEW)) Modified: python/branches/cpy_merge/Modules/getbuildinfo.c ============================================================================== --- python/branches/cpy_merge/Modules/getbuildinfo.c (original) +++ python/branches/cpy_merge/Modules/getbuildinfo.c Thu Jun 14 21:06:29 2007 @@ -20,7 +20,14 @@ #endif #endif +/* on unix, SVNVERSION is passed on the command line. + * on Windows, the string is interpolated using + * subwcrev.exe + */ +#ifndef SVNVERSION #define SVNVERSION "$WCRANGE$$WCMODS?M:$" +#endif + const char * Py_GetBuildInfo(void) { @@ -39,7 +46,7 @@ { /* the following string can be modified by subwcrev.exe */ static const char svnversion[] = SVNVERSION; - if (!strstr(svnversion, "$")) - return svnversion; /* it was interpolated */ + if (svnversion[0] != '$') + return svnversion; /* it was interpolated, or passed on command line */ return "exported"; } Modified: python/branches/cpy_merge/Modules/socketmodule.c ============================================================================== --- python/branches/cpy_merge/Modules/socketmodule.c (original) +++ python/branches/cpy_merge/Modules/socketmodule.c Thu Jun 14 21:06:29 2007 @@ -363,8 +363,11 @@ #define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP #define BTPROTO_RFCOMM BLUETOOTH_PROTO_RFCOMM #define BTPROTO_HCI BLUETOOTH_PROTO_HCI +#define SOL_HCI SOL_HCI_RAW +#define HCI_FILTER SO_HCI_RAW_FILTER #define sockaddr_l2 sockaddr_l2cap #define sockaddr_rc sockaddr_rfcomm +#define hci_dev hci_node #define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb) #define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb) #define _BT_HCI_MEMB(sa, memb) ((sa)->hci_##memb) @@ -4447,10 +4450,10 @@ PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP); PyModule_AddIntConstant(m, "BTPROTO_HCI", BTPROTO_HCI); PyModule_AddIntConstant(m, "SOL_HCI", SOL_HCI); - PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP); - PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR); PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER); #if !defined(__FreeBSD__) + PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP); + PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR); PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO); #endif PyModule_AddIntConstant(m, "BTPROTO_RFCOMM", BTPROTO_RFCOMM); Modified: python/branches/cpy_merge/Objects/abstract.c ============================================================================== --- python/branches/cpy_merge/Objects/abstract.c (original) +++ python/branches/cpy_merge/Objects/abstract.c Thu Jun 14 21:06:29 2007 @@ -971,6 +971,22 @@ return PyFloat_FromString(o); } + +PyObject * +PyNumber_ToBase(PyObject *n, int base) +{ + PyObject *res; + PyObject *index = PyNumber_Index(n); + + if (!index) + return NULL; + assert(PyLong_Check(index)); + res = _PyLong_Format(index, base); + Py_DECREF(index); + return res; +} + + /* Operations on sequences */ int @@ -2133,8 +2149,9 @@ PyObject_IsInstance(PyObject *inst, PyObject *cls) { PyObject *t, *v, *tb; + PyObject *checker; PyErr_Fetch(&t, &v, &tb); - PyObject *checker = PyObject_GetAttrString(cls, "__instancecheck__"); + checker = PyObject_GetAttrString(cls, "__instancecheck__"); PyErr_Restore(t, v, tb); if (checker != NULL) { PyObject *res; @@ -2203,8 +2220,9 @@ PyObject_IsSubclass(PyObject *derived, PyObject *cls) { PyObject *t, *v, *tb; + PyObject *checker; PyErr_Fetch(&t, &v, &tb); - PyObject *checker = PyObject_GetAttrString(cls, "__subclasscheck__"); + checker = PyObject_GetAttrString(cls, "__subclasscheck__"); PyErr_Restore(t, v, tb); if (checker != NULL) { PyObject *res; Modified: python/branches/cpy_merge/Objects/bufferobject.c ============================================================================== --- python/branches/cpy_merge/Objects/bufferobject.c (original) +++ python/branches/cpy_merge/Objects/bufferobject.c Thu Jun 14 21:06:29 2007 @@ -19,7 +19,7 @@ READ_BUFFER, WRITE_BUFFER, CHAR_BUFFER, - ANY_BUFFER, + ANY_BUFFER }; static int Modified: python/branches/cpy_merge/Objects/exceptions.c ============================================================================== --- python/branches/cpy_merge/Objects/exceptions.c (original) +++ python/branches/cpy_merge/Objects/exceptions.c Thu Jun 14 21:06:29 2007 @@ -334,17 +334,9 @@ /* - * StandardError extends Exception + * TypeError extends Exception */ -SimpleExtendsException(PyExc_Exception, StandardError, - "Base class for all standard Python exceptions that do not represent\n" - "interpreter exiting."); - - -/* - * TypeError extends StandardError - */ -SimpleExtendsException(PyExc_StandardError, TypeError, +SimpleExtendsException(PyExc_Exception, TypeError, "Inappropriate argument type."); @@ -425,14 +417,14 @@ /* - * ImportError extends StandardError + * ImportError extends Exception */ -SimpleExtendsException(PyExc_StandardError, ImportError, +SimpleExtendsException(PyExc_Exception, ImportError, "Import can't find module, or can't find name in module."); /* - * EnvironmentError extends StandardError + * EnvironmentError extends Exception */ /* Where a function has a single filename, such as open() or some @@ -657,7 +649,7 @@ {NULL} }; -ComplexExtendsException(PyExc_StandardError, EnvironmentError, +ComplexExtendsException(PyExc_Exception, EnvironmentError, EnvironmentError, EnvironmentError_dealloc, EnvironmentError_methods, EnvironmentError_members, EnvironmentError_str, @@ -867,16 +859,16 @@ /* - * EOFError extends StandardError + * EOFError extends Exception */ -SimpleExtendsException(PyExc_StandardError, EOFError, +SimpleExtendsException(PyExc_Exception, EOFError, "Read beyond end of file."); /* - * RuntimeError extends StandardError + * RuntimeError extends Exception */ -SimpleExtendsException(PyExc_StandardError, RuntimeError, +SimpleExtendsException(PyExc_Exception, RuntimeError, "Unspecified run-time error."); @@ -887,9 +879,9 @@ "Method or function hasn't been implemented yet."); /* - * NameError extends StandardError + * NameError extends Exception */ -SimpleExtendsException(PyExc_StandardError, NameError, +SimpleExtendsException(PyExc_Exception, NameError, "Name not found globally."); /* @@ -899,14 +891,14 @@ "Local name referenced but not bound to a value."); /* - * AttributeError extends StandardError + * AttributeError extends Exception */ -SimpleExtendsException(PyExc_StandardError, AttributeError, +SimpleExtendsException(PyExc_Exception, AttributeError, "Attribute not found."); /* - * SyntaxError extends StandardError + * SyntaxError extends Exception */ static int @@ -1085,7 +1077,7 @@ {NULL} /* Sentinel */ }; -ComplexExtendsException(PyExc_StandardError, SyntaxError, SyntaxError, +ComplexExtendsException(PyExc_Exception, SyntaxError, SyntaxError, SyntaxError_dealloc, 0, SyntaxError_members, SyntaxError_str, "Invalid syntax."); @@ -1105,9 +1097,9 @@ /* - * LookupError extends StandardError + * LookupError extends Exception */ -SimpleExtendsException(PyExc_StandardError, LookupError, +SimpleExtendsException(PyExc_Exception, LookupError, "Base class for lookup errors."); @@ -1144,9 +1136,9 @@ /* - * ValueError extends StandardError + * ValueError extends Exception */ -SimpleExtendsException(PyExc_StandardError, ValueError, +SimpleExtendsException(PyExc_Exception, ValueError, "Inappropriate argument value (of correct type)."); /* @@ -1763,16 +1755,16 @@ /* - * AssertionError extends StandardError + * AssertionError extends Exception */ -SimpleExtendsException(PyExc_StandardError, AssertionError, +SimpleExtendsException(PyExc_Exception, AssertionError, "Assertion failed."); /* - * ArithmeticError extends StandardError + * ArithmeticError extends Exception */ -SimpleExtendsException(PyExc_StandardError, ArithmeticError, +SimpleExtendsException(PyExc_Exception, ArithmeticError, "Base class for arithmetic errors."); @@ -1798,9 +1790,9 @@ /* - * SystemError extends StandardError + * SystemError extends Exception */ -SimpleExtendsException(PyExc_StandardError, SystemError, +SimpleExtendsException(PyExc_Exception, SystemError, "Internal error in the Python interpreter.\n" "\n" "Please report this to the Python maintainer, along with the traceback,\n" @@ -1808,16 +1800,16 @@ /* - * ReferenceError extends StandardError + * ReferenceError extends Exception */ -SimpleExtendsException(PyExc_StandardError, ReferenceError, +SimpleExtendsException(PyExc_Exception, ReferenceError, "Weak ref proxy used after referent went away."); /* - * MemoryError extends StandardError + * MemoryError extends Exception */ -SimpleExtendsException(PyExc_StandardError, MemoryError, "Out of memory."); +SimpleExtendsException(PyExc_Exception, MemoryError, "Out of memory."); /* Warning category docstrings */ @@ -1930,7 +1922,6 @@ PRE_INIT(BaseException) PRE_INIT(Exception) - PRE_INIT(StandardError) PRE_INIT(TypeError) PRE_INIT(StopIteration) PRE_INIT(GeneratorExit) @@ -1992,7 +1983,6 @@ POST_INIT(BaseException) POST_INIT(Exception) - POST_INIT(StandardError) POST_INIT(TypeError) POST_INIT(StopIteration) POST_INIT(GeneratorExit) Modified: python/branches/cpy_merge/Objects/intobject.c ============================================================================== --- python/branches/cpy_merge/Objects/intobject.c (original) +++ python/branches/cpy_merge/Objects/intobject.c Thu Jun 14 21:06:29 2007 @@ -922,32 +922,6 @@ } static PyObject * -int_oct(PyIntObject *v) -{ - char buf[100]; - long x = v -> ob_ival; - if (x < 0) - PyOS_snprintf(buf, sizeof(buf), "-0%lo", -x); - else if (x == 0) - strcpy(buf, "0"); - else - PyOS_snprintf(buf, sizeof(buf), "0%lo", x); - return PyString_FromString(buf); -} - -static PyObject * -int_hex(PyIntObject *v) -{ - char buf[100]; - long x = v -> ob_ival; - if (x < 0) - PyOS_snprintf(buf, sizeof(buf), "-0x%lx", -x); - else - PyOS_snprintf(buf, sizeof(buf), "0x%lx", x); - return PyString_FromString(buf); -} - -static PyObject * int_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject * @@ -1074,8 +1048,8 @@ (unaryfunc)int_int, /*nb_int*/ (unaryfunc)int_long, /*nb_long*/ (unaryfunc)int_float, /*nb_float*/ - (unaryfunc)int_oct, /*nb_oct*/ - (unaryfunc)int_hex, /*nb_hex*/ + 0, /*nb_oct*/ /* not in use */ + 0, /*nb_hex*/ /* not in use */ 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ Modified: python/branches/cpy_merge/Objects/longobject.c ============================================================================== --- python/branches/cpy_merge/Objects/longobject.c (original) +++ python/branches/cpy_merge/Objects/longobject.c Thu Jun 14 21:06:29 2007 @@ -80,7 +80,6 @@ static PyLongObject *mul1(PyLongObject *, wdigit); static PyLongObject *muladd1(PyLongObject *, wdigit, wdigit); static PyLongObject *divrem1(PyLongObject *, digit, digit *); -static PyObject *long_format(PyObject *aa, int base); #define SIGCHECK(PyTryBlock) \ if (--_Py_Ticker < 0) { \ @@ -1384,7 +1383,7 @@ /* Divide long pin, w/ size digits, by non-zero digit n, storing quotient in pout, and returning the remainder. pin and pout point at the LSD. It's OK for pin == pout on entry, which saves oodles of mallocs/frees in - long_format, but that should be done with great care since longs are + _PyLong_Format, but that should be done with great care since longs are immutable. */ static digit @@ -1424,10 +1423,10 @@ /* Convert a long int object to a string, using a given conversion base. Return a string object. - If base is 8 or 16, add the proper prefix '0' or '0x'. */ + If base is 2, 8 or 16, add the proper prefix '0b', '0o' or '0x'. */ -static PyObject * -long_format(PyObject *aa, int base) +PyObject * +_PyLong_Format(PyObject *aa, int base) { register PyLongObject *a = (PyLongObject *)aa; PyStringObject *str; @@ -1551,14 +1550,18 @@ Py_DECREF(scratch); } - if (base == 8) { - if (size_a != 0) - *--p = '0'; - } - else if (base == 16) { + if (base == 16) { *--p = 'x'; *--p = '0'; } + else if (base == 8) { + *--p = 'o'; + *--p = '0'; + } + else if (base == 2) { + *--p = 'b'; + *--p = '0'; + } else if (base != 10) { *--p = '#'; *--p = '0' + base%10; @@ -1675,9 +1678,9 @@ PyObject * PyLong_FromString(char *str, char **pend, int base) { - int sign = 1; + int sign = 1, error_if_nonzero = 0; char *start, *orig_str = str; - PyLongObject *z; + PyLongObject *z = NULL; PyObject *strobj, *strrepr; Py_ssize_t slen; @@ -1701,10 +1704,21 @@ base = 10; else if (str[1] == 'x' || str[1] == 'X') base = 16; - else + else if (str[1] == 'o' || str[1] == 'O') base = 8; + else if (str[1] == 'b' || str[1] == 'B') + base = 2; + else { + /* "old" (C-style) octal literal, now invalid. + it might still be zero though */ + error_if_nonzero = 1; + base = 10; + } } - if (base == 16 && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + if (str[0] == '0' && + ((base == 16 && (str[1] == 'x' || str[1] == 'X')) || + (base == 8 && (str[1] == 'o' || str[1] == 'O')) || + (base == 2 && (str[1] == 'b' || str[1] == 'B')))) str += 2; start = str; @@ -1908,6 +1922,15 @@ } if (z == NULL) return NULL; + if (error_if_nonzero) { + /* reset the base to 0, else the exception message + doesn't make too much sense */ + base = 0; + if (z->ob_size != 0) + goto onError; + /* there might still be other problems, therefore base + remains zero here for the same reason */ + } if (str == start) goto onError; if (sign < 0) @@ -2130,7 +2153,7 @@ static PyObject * long_repr(PyObject *v) { - return long_format(v, 10); + return _PyLong_Format(v, 10); } static int @@ -3489,18 +3512,6 @@ } static PyObject * -long_oct(PyObject *v) -{ - return long_format(v, 8); -} - -static PyObject * -long_hex(PyObject *v) -{ - return long_format(v, 16); -} - -static PyObject * long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject * @@ -3624,8 +3635,8 @@ long_int, /*nb_int*/ long_long, /*nb_long*/ long_float, /*nb_float*/ - long_oct, /*nb_oct*/ - long_hex, /*nb_hex*/ + 0, /*nb_oct*/ /* not used */ + 0, /*nb_hex*/ /* not used */ 0, /* nb_inplace_add */ 0, /* nb_inplace_subtract */ 0, /* nb_inplace_multiply */ Modified: python/branches/cpy_merge/Objects/stringobject.c ============================================================================== --- python/branches/cpy_merge/Objects/stringobject.c (original) +++ python/branches/cpy_merge/Objects/stringobject.c Thu Jun 14 21:06:29 2007 @@ -3309,7 +3309,7 @@ { const char *e, *p; char *q; - Py_ssize_t i, j; + Py_ssize_t i, j, old_j; PyObject *u; int tabsize = 8; @@ -3317,21 +3317,38 @@ return NULL; /* First pass: determine size of output string */ - i = j = 0; + i = j = old_j = 0; e = PyString_AS_STRING(self) + PyString_GET_SIZE(self); for (p = PyString_AS_STRING(self); p < e; p++) if (*p == '\t') { - if (tabsize > 0) + if (tabsize > 0) { j += tabsize - (j % tabsize); + if (old_j > j) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } + old_j = j; + } } else { j++; if (*p == '\n' || *p == '\r') { i += j; - j = 0; + old_j = j = 0; + if (i < 0) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } } } + if ((i + j) < 0) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + /* Second pass: create output string and fill it */ u = PyString_FromStringAndSize(NULL, i + j); if (!u) @@ -4243,12 +4260,13 @@ result = val->ob_type->tp_str(val); break; case 'o': - result = val->ob_type->tp_as_number->nb_oct(val); + numnondigits = 2; + result = PyNumber_ToBase(val, 8); break; case 'x': case 'X': numnondigits = 2; - result = val->ob_type->tp_as_number->nb_hex(val); + result = PyNumber_ToBase(val, 16); break; default: assert(!"'type' not in [duoxX]"); @@ -4283,32 +4301,16 @@ assert(numdigits > 0); /* Get rid of base marker unless F_ALT */ - if ((flags & F_ALT) == 0) { - /* Need to skip 0x, 0X or 0. */ - int skipped = 0; - switch (type) { - case 'o': - assert(buf[sign] == '0'); - /* If 0 is only digit, leave it alone. */ - if (numdigits > 1) { - skipped = 1; - --numdigits; - } - break; - case 'x': - case 'X': - assert(buf[sign] == '0'); - assert(buf[sign + 1] == 'x'); - skipped = 2; - numnondigits -= 2; - break; - } - if (skipped) { - buf += skipped; - len -= skipped; - if (sign) - buf[0] = '-'; - } + if (((flags & F_ALT) == 0 && + (type == 'o' || type == 'x' || type == 'X'))) { + assert(buf[sign] == '0'); + assert(buf[sign+1] == 'x' || buf[sign+1] == 'X' || + buf[sign+1] == 'o'); + numnondigits -= 2; + buf += 2; + len -= 2; + if (sign) + buf[0] = '-'; assert(len == numnondigits + numdigits); assert(numdigits > 0); } @@ -4377,9 +4379,10 @@ prec = 1; if ((flags & F_ALT) && - (type == 'x' || type == 'X')) { - /* When converting under %#x or %#X, there are a number + (type == 'x' || type == 'X' || type == 'o')) { + /* When converting under %#o, %#x or %#X, there are a number * of issues that cause pain: + * - for %#o, we want a different base marker than C * - when 0 is being converted, the C standard leaves off * the '0x' or '0X', which is inconsistent with other * %#x/%#X conversions and inconsistent with Python's @@ -4407,7 +4410,7 @@ prec, type); } - /* buf = '+'/'-'/'' + '0'/'0x'/'' + '[0-9]'*max(prec, len(x in octal)) + /* buf = '+'/'-'/'' + '0o'/'0x'/'' + '[0-9]'*max(prec, len(x in octal)) * worst case buf = '-0x' + [0-9]*prec, where prec >= 11 */ if (buflen <= 14 || buflen <= (size_t)3 + (size_t)prec) { @@ -4805,7 +4808,8 @@ if (width > len) width--; } - if ((flags & F_ALT) && (c == 'x' || c == 'X')) { + if ((flags & F_ALT) && + (c == 'x' || c == 'X' || c == 'o')) { assert(pbuf[0] == '0'); assert(pbuf[1] == c); if (fill != ' ') { @@ -4828,7 +4832,7 @@ if (sign) *res++ = sign; if ((flags & F_ALT) && - (c == 'x' || c == 'X')) { + (c == 'x' || c == 'X' || c == 'o')) { assert(pbuf[0] == '0'); assert(pbuf[1] == c); *res++ = *pbuf++; Modified: python/branches/cpy_merge/Objects/typeobject.c ============================================================================== --- python/branches/cpy_merge/Objects/typeobject.c (original) +++ python/branches/cpy_merge/Objects/typeobject.c Thu Jun 14 21:06:29 2007 @@ -1,6 +1,7 @@ /* Type object implementation */ #include "Python.h" +#include "frameobject.h" #include "structmember.h" #include @@ -3236,8 +3237,6 @@ COPYNUM(nb_int); COPYNUM(nb_long); COPYNUM(nb_float); - COPYNUM(nb_oct); - COPYNUM(nb_hex); COPYNUM(nb_inplace_add); COPYNUM(nb_inplace_subtract); COPYNUM(nb_inplace_multiply); @@ -4556,8 +4555,6 @@ SLOT0(slot_nb_int, "__int__") SLOT0(slot_nb_long, "__long__") SLOT0(slot_nb_float, "__float__") -SLOT0(slot_nb_oct, "__oct__") -SLOT0(slot_nb_hex, "__hex__") SLOT1(slot_nb_inplace_add, "__iadd__", PyObject *, "O") SLOT1(slot_nb_inplace_subtract, "__isub__", PyObject *, "O") SLOT1(slot_nb_inplace_multiply, "__imul__", PyObject *, "O") @@ -5208,10 +5205,6 @@ "long(x)"), UNSLOT("__float__", nb_float, slot_nb_float, wrap_unaryfunc, "float(x)"), - UNSLOT("__oct__", nb_oct, slot_nb_oct, wrap_unaryfunc, - "oct(x)"), - UNSLOT("__hex__", nb_hex, slot_nb_hex, wrap_unaryfunc, - "hex(x)"), NBSLOT("__index__", nb_index, slot_nb_index, wrap_unaryfunc, "x[y:z] <==> x[y.__index__():z.__index__()]"), IBSLOT("__iadd__", nb_inplace_add, slot_nb_inplace_add, @@ -5874,14 +5867,76 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds) { superobject *su = (superobject *)self; - PyTypeObject *type; + PyTypeObject *type = NULL; PyObject *obj = NULL; PyTypeObject *obj_type = NULL; if (!_PyArg_NoKeywords("super", kwds)) return -1; - if (!PyArg_ParseTuple(args, "O!|O:super", &PyType_Type, &type, &obj)) + if (!PyArg_ParseTuple(args, "|O!O:super", &PyType_Type, &type, &obj)) return -1; + + if (type == NULL) { + /* Call super(), without args -- fill in from __class__ + and first local variable on the stack. */ + PyFrameObject *f = PyThreadState_GET()->frame; + PyCodeObject *co = f->f_code; + int i, n; + if (co == NULL) { + PyErr_SetString(PyExc_SystemError, + "super(): no code object"); + return -1; + } + if (co->co_argcount == 0) { + PyErr_SetString(PyExc_SystemError, + "super(): no arguments"); + return -1; + } + obj = f->f_localsplus[0]; + if (obj == NULL) { + PyErr_SetString(PyExc_SystemError, + "super(): arg[0] deleted"); + return -1; + } + if (co->co_freevars == NULL) + n = 0; + else { + assert(PyTuple_Check(co->co_freevars)); + n = PyTuple_GET_SIZE(co->co_freevars); + } + for (i = 0; i < n; i++) { + PyObject *name = PyTuple_GET_ITEM(co->co_freevars, i); + assert(PyString_Check(name)); /* XXX PyUnicode? */ + if (!strcmp(PyString_AS_STRING(name), "__class__")) { + PyObject *cell = + f->f_localsplus[co->co_nlocals + i]; + if (cell == NULL || !PyCell_Check(cell)) { + PyErr_SetString(PyExc_SystemError, + "super(): bad __class__ cell"); + return -1; + } + type = (PyTypeObject *) PyCell_GET(cell); + if (type == NULL) { + PyErr_SetString(PyExc_SystemError, + "super(): empty __class__ cell"); + return -1; + } + if (!PyType_Check(type)) { + PyErr_Format(PyExc_SystemError, + "super(): __class__ is not a type (%s)", + type->ob_type->tp_name); + return -1; + } + break; + } + } + if (type == NULL) { + PyErr_SetString(PyExc_SystemError, + "super(): __class__ cell not found"); + return -1; + } + } + if (obj == Py_None) obj = NULL; if (obj != NULL) { @@ -5898,13 +5953,19 @@ } PyDoc_STRVAR(super_doc, +"super() -> same as super(__class__, )\n" "super(type) -> unbound super object\n" "super(type, obj) -> bound super object; requires isinstance(obj, type)\n" "super(type, type2) -> bound super object; requires issubclass(type2, type)\n" "Typical use to call a cooperative superclass method:\n" "class C(B):\n" " def meth(self, arg):\n" -" super(C, self).meth(arg)"); +" super().meth(arg)\n" +"This works for class methods too:\n" +"class C(B):\n" +" @classmethod\n" +" def cmeth(cls, arg):\n" +" super().cmeth(arg)\n"); static int super_traverse(PyObject *self, visitproc visit, void *arg) Modified: python/branches/cpy_merge/Objects/unicodeobject.c ============================================================================== --- python/branches/cpy_merge/Objects/unicodeobject.c (original) +++ python/branches/cpy_merge/Objects/unicodeobject.c Thu Jun 14 21:06:29 2007 @@ -5693,7 +5693,7 @@ Py_UNICODE *e; Py_UNICODE *p; Py_UNICODE *q; - Py_ssize_t i, j; + Py_ssize_t i, j, old_j; PyUnicodeObject *u; int tabsize = 8; @@ -5701,21 +5701,38 @@ return NULL; /* First pass: determine size of output string */ - i = j = 0; + i = j = old_j = 0; e = self->str + self->length; for (p = self->str; p < e; p++) if (*p == '\t') { - if (tabsize > 0) + if (tabsize > 0) { j += tabsize - (j % tabsize); + if (old_j > j) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } + old_j = j; + } } else { j++; if (*p == '\n' || *p == '\r') { i += j; - j = 0; + old_j = j = 0; + if (i < 0) { + PyErr_SetString(PyExc_OverflowError, + "new string is too long"); + return NULL; + } } } + if ((i + j) < 0) { + PyErr_SetString(PyExc_OverflowError, "new string is too long"); + return NULL; + } + /* Second pass: create output string and fill it */ u = _PyUnicode_New(i + j); if (!u) @@ -7354,9 +7371,10 @@ } if ((flags & F_ALT) && - (type == 'x' || type == 'X')) { - /* When converting under %#x or %#X, there are a number + (type == 'x' || type == 'X' || type == 'o')) { + /* When converting under %#o, %#x or %#X, there are a number * of issues that cause pain: + * - for %#o, we want a different base marker than C * - when 0 is being converted, the C standard leaves off * the '0x' or '0X', which is inconsistent with other * %#x/%#X conversions and inconsistent with Python's @@ -7814,7 +7832,7 @@ if (width > len) width--; } - if ((flags & F_ALT) && (c == 'x' || c == 'X')) { + if ((flags & F_ALT) && (c == 'x' || c == 'X' || c == 'o')) { assert(pbuf[0] == '0'); assert(pbuf[1] == c); if (fill != ' ') { @@ -7836,7 +7854,7 @@ if (fill == ' ') { if (sign) *res++ = sign; - if ((flags & F_ALT) && (c == 'x' || c == 'X')) { + if ((flags & F_ALT) && (c == 'x' || c == 'X' || c == 'o')) { assert(pbuf[0] == '0'); assert(pbuf[1] == c); *res++ = *pbuf++; Modified: python/branches/cpy_merge/PC/os2emx/python25.def ============================================================================== --- python/branches/cpy_merge/PC/os2emx/python25.def (original) +++ python/branches/cpy_merge/PC/os2emx/python25.def Thu Jun 14 21:06:29 2007 @@ -767,7 +767,6 @@ "_PyExc_Fini" "PyExc_BaseException" "PyExc_Exception" - "PyExc_StandardError" "PyExc_TypeError" "PyExc_StopIteration" "PyExc_GeneratorExit" Modified: python/branches/cpy_merge/PC/os2vacpp/python.def ============================================================================== --- python/branches/cpy_merge/PC/os2vacpp/python.def (original) +++ python/branches/cpy_merge/PC/os2vacpp/python.def Thu Jun 14 21:06:29 2007 @@ -30,7 +30,6 @@ PyExc_OSError PyExc_OverflowError PyExc_RuntimeError - PyExc_StandardError PyExc_SyntaxError PyExc_SystemError PyExc_SystemExit Modified: python/branches/cpy_merge/PC/pyconfig.h ============================================================================== --- python/branches/cpy_merge/PC/pyconfig.h (original) +++ python/branches/cpy_merge/PC/pyconfig.h Thu Jun 14 21:06:29 2007 @@ -247,6 +247,9 @@ #define COMPILER "[gcc]" #define hypot _hypot #define PY_LONG_LONG long long +#define PY_LLONG_MIN LLONG_MIN +#define PY_LLONG_MAX LLONG_MAX +#define PY_ULLONG_MAX ULLONG_MAX #endif /* GNUC */ /* ------------------------------------------------------------------------*/ @@ -272,6 +275,9 @@ #define HAVE_LONG_LONG 1 #ifndef PY_LONG_LONG # define PY_LONG_LONG __int64 +# define PY_LLONG_MAX LLONG_MAX +# define PY_LLONG_MIN LLONG_MIN +# define PY_ULLONG_MAX ULLONG_MAX #endif /* For Windows the Python core is in a DLL by default. Test Modified: python/branches/cpy_merge/PCbuild/_bsddb.vcproj ============================================================================== --- python/branches/cpy_merge/PCbuild/_bsddb.vcproj (original) +++ python/branches/cpy_merge/PCbuild/_bsddb.vcproj Thu Jun 14 21:06:29 2007 @@ -213,7 +213,7 @@ done = E_TOKEN; tok_backup(tok, c); return ERRORTOKEN; Modified: python/branches/cpy_merge/Python/ast.c ============================================================================== --- python/branches/cpy_merge/Python/ast.c (original) +++ python/branches/cpy_merge/Python/ast.c Thu Jun 14 21:06:29 2007 @@ -1922,6 +1922,10 @@ return NULL; } key = e->v.Name.id; + if (!strcmp(PyString_AS_STRING(key), "None")) { + ast_error(CHILD(ch, 0), "assignment to None"); + return NULL; + } e = ast_for_expr(c, CHILD(ch, 2)); if (!e) return NULL; @@ -3029,8 +3033,6 @@ #ifndef WITHOUT_COMPLEX imflag = *end == 'j' || *end == 'J'; #endif - if (*end == 'l' || *end == 'L') - return PyLong_FromString((char *)s, (char **)0, 0); if (s[0] == '0') { x = (long) PyOS_strtoul((char *)s, (char **)&end, 0); if (x < 0 && errno == 0) { Modified: python/branches/cpy_merge/Python/bltinmodule.c ============================================================================== --- python/branches/cpy_merge/Python/bltinmodule.c (original) +++ python/branches/cpy_merge/Python/bltinmodule.c Thu Jun 14 21:06:29 2007 @@ -33,7 +33,8 @@ static PyObject * builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds) { - PyObject *func, *name, *bases, *mkw, *meta, *prep, *ns, *res; + PyObject *func, *name, *bases, *mkw, *meta, *prep, *ns, *cell; + PyObject *cls = NULL; Py_ssize_t nargs, nbases; assert(args != NULL); @@ -114,22 +115,25 @@ return NULL; } } - res = PyObject_CallFunctionObjArgs(func, ns, NULL); - if (res != NULL) { + cell = PyObject_CallFunctionObjArgs(func, ns, NULL); + if (cell != NULL) { PyObject *margs; - Py_DECREF(res); - res = NULL; margs = Py_BuildValue("OOO", name, bases, ns); if (margs != NULL) { - res = PyEval_CallObjectWithKeywords(meta, margs, mkw); + cls = PyEval_CallObjectWithKeywords(meta, margs, mkw); Py_DECREF(margs); } + if (cls != NULL && PyCell_Check(cell)) { + Py_INCREF(cls); + PyCell_SET(cell, cls); + } + Py_DECREF(cell); } Py_DECREF(ns); Py_DECREF(meta); Py_XDECREF(mkw); Py_DECREF(bases); - return res; + return cls; } PyDoc_STRVAR(build_class_doc, @@ -247,6 +251,18 @@ static PyObject * +builtin_bin(PyObject *self, PyObject *v) +{ + return PyNumber_ToBase(v, 2); +} + +PyDoc_STRVAR(bin_doc, +"bin(number) -> string\n\ +\n\ +Return the binary representation of an integer or long integer."); + + +static PyObject * builtin_filter(PyObject *self, PyObject *args) { PyObject *func, *seq, *result, *it, *arg; @@ -1230,24 +1246,7 @@ static PyObject * builtin_hex(PyObject *self, PyObject *v) { - PyNumberMethods *nb; - PyObject *res; - - if ((nb = v->ob_type->tp_as_number) == NULL || - nb->nb_hex == NULL) { - PyErr_SetString(PyExc_TypeError, - "hex() argument can't be converted to hex"); - return NULL; - } - res = (*nb->nb_hex)(v); - if (res && !PyString_Check(res)) { - PyErr_Format(PyExc_TypeError, - "__hex__ returned non-string (type %.200s)", - res->ob_type->tp_name); - Py_DECREF(res); - return NULL; - } - return res; + return PyNumber_ToBase(v, 16); } PyDoc_STRVAR(hex_doc, @@ -1430,24 +1429,7 @@ static PyObject * builtin_oct(PyObject *self, PyObject *v) { - PyNumberMethods *nb; - PyObject *res; - - if (v == NULL || (nb = v->ob_type->tp_as_number) == NULL || - nb->nb_oct == NULL) { - PyErr_SetString(PyExc_TypeError, - "oct() argument can't be converted to oct"); - return NULL; - } - res = (*nb->nb_oct)(v); - if (res && !PyString_Check(res)) { - PyErr_Format(PyExc_TypeError, - "__oct__ returned non-string (type %.200s)", - res->ob_type->tp_name); - Py_DECREF(res); - return NULL; - } - return res; + return PyNumber_ToBase(v, 8); } PyDoc_STRVAR(oct_doc, @@ -1949,6 +1931,7 @@ {"abs", builtin_abs, METH_O, abs_doc}, {"all", builtin_all, METH_O, all_doc}, {"any", builtin_any, METH_O, any_doc}, + {"bin", builtin_bin, METH_O, bin_doc}, {"chr", builtin_chr, METH_VARARGS, chr_doc}, {"cmp", builtin_cmp, METH_VARARGS, cmp_doc}, {"compile", (PyCFunction)builtin_compile, METH_VARARGS | METH_KEYWORDS, compile_doc}, Modified: python/branches/cpy_merge/Python/compile.c ============================================================================== --- python/branches/cpy_merge/Python/compile.c (original) +++ python/branches/cpy_merge/Python/compile.c Thu Jun 14 21:06:29 2007 @@ -373,10 +373,12 @@ while (PyDict_Next(src, &pos, &k, &v)) { /* XXX this should probably be a macro in symtable.h */ + long vi; assert(PyInt_Check(v)); - scope = (PyInt_AS_LONG(v) >> SCOPE_OFFSET) & SCOPE_MASK; + vi = PyInt_AS_LONG(v); + scope = (vi >> SCOPE_OFFSET) & SCOPE_MASK; - if (scope == scope_type || PyInt_AS_LONG(v) & flag) { + if (scope == scope_type || vi & flag) { PyObject *tuple, *item = PyInt_FromLong(i); if (item == NULL) { Py_DECREF(dest); @@ -1125,7 +1127,8 @@ if (!asdl_seq_LEN(stmts)) return 1; st = (stmt_ty)asdl_seq_GET(stmts, 0); - if (compiler_isdocstring(st)) { + if (compiler_isdocstring(st) && Py_OptimizeFlag < 2) { + /* don't generate docstrings if -OO */ i = 1; VISIT(c, expr, st->v.Expr.value); if (!compiler_nameop(c, __doc__, Store)) @@ -1251,7 +1254,8 @@ else /* (reftype == FREE) */ arg = compiler_lookup_arg(c->u->u_freevars, name); if (arg == -1) { - printf("lookup %s in %s %d %d\n" + fprintf(stderr, + "lookup %s in %s %d %d\n" "freevars of %s: %s\n", PyObject_REPR(name), PyString_AS_STRING(c->u->u_name), @@ -1474,7 +1478,6 @@ static int compiler_class(struct compiler *c, stmt_ty s) { - static PyObject *build_class = NULL; static PyObject *locals = NULL; PyCodeObject *co; PyObject *str; @@ -1485,13 +1488,7 @@ if (!compiler_decorators(c, decos)) return 0; - /* initialize statics */ - if (build_class == NULL) { - build_class = PyString_FromString("__build_class__"); - if (build_class == NULL) - return 0; - } if (locals == NULL) { locals = PyString_FromString("__locals__"); if (locals == NULL) @@ -1501,14 +1498,16 @@ /* ultimately generate code for: = __build_class__(, , *, **) where: - is a function/closure created from the class body + is a function/closure created from the class body; + it has a single argument (__locals__) where the dict + (or MutableSequence) representing the locals is passed is the class name is the positional arguments and *varargs argument is the keyword arguments and **kwds argument This borrows from compiler_call. */ - /* 0. Create a fake variable named __locals__ */ + /* 0. Create a fake argument named __locals__ */ ste = PySymtable_Lookup(c->c_st, s); if (ste == NULL) return 0; @@ -1528,11 +1527,11 @@ c->u->u_private = s->v.ClassDef.name; /* force it to have one mandatory argument */ c->u->u_argcount = 1; - /* load the first argument ... */ + /* load the first argument (__locals__) ... */ ADDOP_I(c, LOAD_FAST, 0); /* ... and store it into f_locals */ ADDOP_IN_SCOPE(c, STORE_LOCALS); - /* load __name__ ... */ + /* load (global) __name__ ... */ str = PyString_InternFromString("__name__"); if (!str || !compiler_nameop(c, str, Load)) { Py_XDECREF(str); @@ -1553,8 +1552,24 @@ compiler_exit_scope(c); return 0; } - /* return None */ - ADDOP_O(c, LOAD_CONST, Py_None, consts); + /* return the (empty) __class__ cell */ + str = PyString_InternFromString("__class__"); + if (str == NULL) { + compiler_exit_scope(c); + return 0; + } + i = compiler_lookup_arg(c->u->u_cellvars, str); + Py_DECREF(str); + if (i == -1) { + /* This happens when nobody references the cell */ + PyErr_Clear(); + /* Return None */ + ADDOP_O(c, LOAD_CONST, Py_None, consts); + } + else { + /* Return the cell where to store __class__ */ + ADDOP_I(c, LOAD_CLOSURE, i); + } ADDOP_IN_SCOPE(c, RETURN_VALUE); /* create the code object */ co = assemble(c, 1); @@ -2421,7 +2436,7 @@ return compiler_error(c, "can not assign to __debug__"); } -mangled = _Py_Mangle(c->u->u_private, name); + mangled = _Py_Mangle(c->u->u_private, name); if (!mangled) return 0; @@ -2947,6 +2962,7 @@ static int expr_constant(expr_ty e) { + char *id; switch (e->kind) { case Ellipsis_kind: return 1; @@ -2955,11 +2971,13 @@ case Str_kind: return PyObject_IsTrue(e->v.Str.s); case Name_kind: - /* __debug__ is not assignable, so we can optimize - * it away in if and while statements */ - if (strcmp(PyString_AS_STRING(e->v.Name.id), - "__debug__") == 0) - return ! Py_OptimizeFlag; + /* optimize away names that can't be reassigned */ + id = PyString_AS_STRING(e->v.Name.id); + if (strcmp(id, "True") == 0) return 1; + if (strcmp(id, "False") == 0) return 0; + if (strcmp(id, "None") == 0) return 0; + if (strcmp(id, "__debug__") == 0) + return ! Py_OptimizeFlag; /* fall through */ default: return -1; Modified: python/branches/cpy_merge/Python/mystrtoul.c ============================================================================== --- python/branches/cpy_merge/Python/mystrtoul.c (original) +++ python/branches/cpy_merge/Python/mystrtoul.c Thu Jun 14 21:06:29 2007 @@ -91,7 +91,7 @@ ** This is a general purpose routine for converting ** an ascii string to an integer in an arbitrary base. ** Leading white space is ignored. If 'base' is zero -** it looks for a leading 0, 0x or 0X to tell which +** it looks for a leading 0b, 0o or 0x to tell which ** base. If these are absent it defaults to 10. ** Base must be 0 or between 2 and 36 (inclusive). ** If 'ptr' is non-NULL it will contain a pointer to @@ -110,29 +110,57 @@ while (*str && isspace(Py_CHARMASK(*str))) ++str; - /* check for leading 0 or 0x for auto-base or base 16 */ + /* check for leading 0b, 0o or 0x for auto-base or base 16 */ switch (base) { - case 0: /* look for leading 0, 0x or 0X */ - if (*str == '0') { + case 0: /* look for leading 0b, 0o or 0x */ + if (*str == '0') { + ++str; + if (*str == 'x' || *str == 'X') { ++str; - if (*str == 'x' || *str == 'X') { - ++str; - base = 16; - } - else - base = 8; - } - else - base = 10; - break; - - case 16: /* skip leading 0x or 0X */ - if (*str == '0') { + base = 16; + } else if (*str == 'o' || *str == 'O') { ++str; - if (*str == 'x' || *str == 'X') + base = 8; + } else if (*str == 'b' || *str == 'B') { + ++str; + base = 2; + } else { + /* skip all zeroes... */ + while (*str == '0') + ++str; + while (isspace(Py_CHARMASK(*str))) ++str; + if (ptr) + *ptr = str; + return 0; } - break; + } + else + base = 10; + break; + + /* even with explicit base, skip leading 0? prefix */ + case 16: + if (*str == '0') { + ++str; + if (*str == 'x' || *str == 'X') + ++str; + } + break; + case 8: + if (*str == '0') { + ++str; + if (*str == 'o' || *str == 'O') + ++str; + } + break; + case 2: + if(*str == '0') { + ++str; + if (*str == 'b' || *str == 'B') + ++str; + } + break; } /* catch silly bases */ Modified: python/branches/cpy_merge/Python/peephole.c ============================================================================== --- python/branches/cpy_merge/Python/peephole.c (original) +++ python/branches/cpy_merge/Python/peephole.c Thu Jun 14 21:06:29 2007 @@ -257,6 +257,37 @@ return blocks; } +/* Helper to replace LOAD_NAME None/True/False with LOAD_CONST + Returns: 0 if no change, 1 if change, -1 if error */ +static int +load_global(unsigned char *codestr, Py_ssize_t i, char *name, PyObject *consts) +{ + Py_ssize_t j; + PyObject *obj; + if (name == NULL) + return 0; + if (strcmp(name, "None") == 0) + obj = Py_None; + else if (strcmp(name, "True") == 0) + obj = Py_True; + else if (strcmp(name, "False") == 0) + obj = Py_False; + else + return 0; + for (j = 0; j < PyList_GET_SIZE(consts); j++) { + if (PyList_GET_ITEM(consts, j) == obj) + break; + } + if (j == PyList_GET_SIZE(consts)) { + if (PyList_Append(consts, obj) < 0) + return -1; + } + assert(PyList_GET_ITEM(consts, j) == obj); + codestr[i] = LOAD_CONST; + SETARG(codestr, i, j); + return 1; +} + /* Perform basic peephole optimizations to components of a code object. The consts object should still be in list form to allow new constants to be appended. @@ -302,7 +333,7 @@ /* Avoid situations where jump retargeting could overflow */ assert(PyString_Check(code)); - codelen = PyString_Size(code); + codelen = PyString_GET_SIZE(code); if (codelen > 32700) goto exitUnchanged; @@ -371,25 +402,17 @@ codestr[i+3] = NOP; break; - /* Replace LOAD_GLOBAL/LOAD_NAME None - with LOAD_CONST None */ + /* Replace LOAD_GLOBAL/LOAD_NAME None/True/False + with LOAD_CONST None/True/False */ case LOAD_NAME: case LOAD_GLOBAL: j = GETARG(codestr, i); name = PyString_AsString(PyTuple_GET_ITEM(names, j)); - if (name == NULL || strcmp(name, "None") != 0) + h = load_global(codestr, i, name, consts); + if (h < 0) + goto exitUnchanged; + else if (h == 0) continue; - for (j=0 ; j < PyList_GET_SIZE(consts) ; j++) { - if (PyList_GET_ITEM(consts, j) == Py_None) - break; - } - if (j == PyList_GET_SIZE(consts)) { - if (PyList_Append(consts, Py_None) == -1) - goto exitUnchanged; - } - assert(PyList_GET_ITEM(consts, j) == Py_None); - codestr[i] = LOAD_CONST; - SETARG(codestr, i, j); cumlc = lastlc + 1; break; Modified: python/branches/cpy_merge/Python/structmember.c ============================================================================== --- python/branches/cpy_merge/Python/structmember.c (original) +++ python/branches/cpy_merge/Python/structmember.c Thu Jun 14 21:06:29 2007 @@ -289,31 +289,25 @@ } break; #ifdef HAVE_LONG_LONG - case T_LONGLONG: - if (!PyLong_Check(v)) { - PyErr_BadArgument(); + case T_LONGLONG:{ + PY_LONG_LONG value; + *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v); + if ((value == -1) && PyErr_Occurred()) return -1; - } else { - PY_LONG_LONG value; - *(PY_LONG_LONG*)addr = value = PyLong_AsLongLong(v); - if ((value == -1) && PyErr_Occurred()) { - return -1; - } - } - break; - case T_ULONGLONG: - if (!PyLong_Check(v)) { - PyErr_BadArgument(); - return -1; - } else { - unsigned PY_LONG_LONG value; - *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v); - if ((value == (unsigned PY_LONG_LONG)-1) && - PyErr_Occurred()) { - return -1; - } - } - break; + break; + } + case T_ULONGLONG:{ + unsigned PY_LONG_LONG value; + /* ??? PyLong_AsLongLong accepts an int, but PyLong_AsUnsignedLongLong + doesn't ??? */ + if (PyLong_Check(v)) + *(unsigned PY_LONG_LONG*)addr = value = PyLong_AsUnsignedLongLong(v); + else + *(unsigned PY_LONG_LONG*)addr = value = PyInt_AsLong(v); + if ((value == (unsigned PY_LONG_LONG)-1) && PyErr_Occurred()) + return -1; + break; + } #endif /* HAVE_LONG_LONG */ default: PyErr_Format(PyExc_SystemError, Modified: python/branches/cpy_merge/Python/symtable.c ============================================================================== --- python/branches/cpy_merge/Python/symtable.c (original) +++ python/branches/cpy_merge/Python/symtable.c Thu Jun 14 21:06:29 2007 @@ -187,7 +187,7 @@ static identifier top = NULL, lambda = NULL, genexpr = NULL, - listcomp = NULL, setcomp = NULL; + listcomp = NULL, setcomp = NULL, __class__ = NULL; #define GET_IDENTIFIER(VAR) \ ((VAR) ? (VAR) : ((VAR) = PyString_InternFromString(# VAR))) @@ -321,7 +321,7 @@ /* Analyze raw symbol information to determine scope of each name. - The next several functions are helpers for PySymtable_Analyze(), + The next several functions are helpers for symtable_analyze(), which determines whether a name is local, global, or free. In addition, it determines which local variables are cell variables; they provide bindings that are used for free variables in enclosed blocks. @@ -468,10 +468,13 @@ Note that the current block's free variables are included in free. That's safe because no name can be free and local in the same scope. + + The 'restrict' argument may be set to a string to restrict the analysis + to the one variable whose name equals that string (e.g. "__class__"). */ static int -analyze_cells(PyObject *scopes, PyObject *free) +analyze_cells(PyObject *scopes, PyObject *free, const char *restrict) { PyObject *name, *v, *v_cell; int success = 0; @@ -488,6 +491,9 @@ continue; if (!PySet_Contains(free, name)) continue; + if (restrict != NULL && + strcmp(PyString_AS_STRING(name), restrict)) + continue; /* Replace LOCAL with CELL for this name, and remove from free. It is safe to replace the value of name in the dict, because it will not cause a resize. @@ -596,7 +602,7 @@ } Py_DECREF(v_new); } - /* It's a cell, or already a free variable in this scope */ + /* It's a cell, or already free in this scope */ Py_DECREF(name); continue; } @@ -682,8 +688,7 @@ goto error; } - /* Populate global and bound sets to be passed to children. - */ + /* Populate global and bound sets to be passed to children. */ if (ste->ste_type != ClassBlock) { /* Add function locals to bound set */ if (ste->ste_type == FunctionBlock) { @@ -702,6 +707,14 @@ goto error; Py_DECREF(newglobal); } + else { + /* Special-case __class__ */ + if (!GET_IDENTIFIER(__class__)) + goto error; + assert(PySet_Contains(local, __class__) == 1); + if (PySet_Add(newbound, __class__) < 0) + goto error; + } /* Recursively call analyze_block() on each child block */ for (i = 0; i < PyList_GET_SIZE(ste->ste_children); ++i) { @@ -716,8 +729,12 @@ ste->ste_child_free = 1; } - /* Check if any local variables need to be converted to cell variables */ - if (ste->ste_type == FunctionBlock && !analyze_cells(scopes, newfree)) + /* Check if any local variables must be converted to cell variables */ + if (ste->ste_type == FunctionBlock && !analyze_cells(scopes, newfree, + NULL)) + goto error; + else if (ste->ste_type == ClassBlock && !analyze_cells(scopes, newfree, + "__class__")) goto error; /* Records the results of the analysis in the symbol table entry */ if (!update_symbols(ste->ste_symbols, scopes, bound, newfree, @@ -1034,6 +1051,11 @@ if (!symtable_enter_block(st, s->v.ClassDef.name, ClassBlock, (void *)s, s->lineno)) return 0; + if (!GET_IDENTIFIER(__class__) || + !symtable_add_def(st, __class__, DEF_LOCAL)) { + symtable_exit_block(st, s); + return 0; + } tmp = st->st_private; st->st_private = s->v.ClassDef.name; VISIT_SEQ_IN_BLOCK(st, stmt, s->v.ClassDef.body, s); @@ -1301,6 +1323,14 @@ if (!symtable_add_def(st, e->v.Name.id, e->v.Name.ctx == Load ? USE : DEF_LOCAL)) return 0; + /* Special-case super: it counts as a use of __class__ */ + if (e->v.Name.ctx == Load && + st->st_cur->ste_type == FunctionBlock && + !strcmp(PyString_AS_STRING(e->v.Name.id), "super")) { + if (!GET_IDENTIFIER(__class__) || + !symtable_add_def(st, __class__, USE)) + return 0; + } break; /* child nodes of List and Tuple will have expr_context set */ case List_kind: Modified: python/branches/cpy_merge/README ============================================================================== --- python/branches/cpy_merge/README (original) +++ python/branches/cpy_merge/README Thu Jun 14 21:06:29 2007 @@ -666,7 +666,11 @@ News regarding these platforms with more recent Cygwin versions would be appreciated! -AtheOS: From Octavian Cerna : +AtheOS: Official support has been stopped as of Python 2.6. All code will be + removed in Python 2.7 unless a maintainer steps forward for this + platform. + + From Octavian Cerna : Before building: Modified: python/branches/cpy_merge/Tools/i18n/msgfmt.py ============================================================================== --- python/branches/cpy_merge/Tools/i18n/msgfmt.py (original) +++ python/branches/cpy_merge/Tools/i18n/msgfmt.py Thu Jun 14 21:06:29 2007 @@ -83,7 +83,7 @@ voffsets += [l2, o2+valuestart] offsets = koffsets + voffsets output = struct.pack("Iiiiiii", - 0x950412deL, # Magic + 0x950412de, # Magic 0, # Version len(keys), # # of entries 7*4, # start of key index Modified: python/branches/cpy_merge/Tools/pybench/Arithmetic.py ============================================================================== --- python/branches/cpy_merge/Tools/pybench/Arithmetic.py (original) +++ python/branches/cpy_merge/Tools/pybench/Arithmetic.py Thu Jun 14 21:06:29 2007 @@ -476,9 +476,9 @@ for i in range(self.rounds): - a = 2220001L - b = 100001L - c = 30005L + a = 2220001 + b = 100001 + c = 30005 c = a + b c = b + c @@ -504,9 +504,9 @@ c = b / a c = c / b - a = 2220001L - b = 100001L - c = 30005L + a = 2220001 + b = 100001 + c = 30005 c = a + b c = b + c @@ -532,9 +532,9 @@ c = b / a c = c / b - a = 2220001L - b = 100001L - c = 30005L + a = 2220001 + b = 100001 + c = 30005 c = a + b c = b + c @@ -560,9 +560,9 @@ c = b / a c = c / b - a = 2220001L - b = 100001L - c = 30005L + a = 2220001 + b = 100001 + c = 30005 c = a + b c = b + c @@ -588,9 +588,9 @@ c = b / a c = c / b - a = 2220001L - b = 100001L - c = 30005L + a = 2220001 + b = 100001 + c = 30005 c = a + b c = b + c Modified: python/branches/cpy_merge/Tools/pybench/CommandLine.py ============================================================================== --- python/branches/cpy_merge/Tools/pybench/CommandLine.py (original) +++ python/branches/cpy_merge/Tools/pybench/CommandLine.py Thu Jun 14 21:06:29 2007 @@ -82,7 +82,7 @@ else: f = open(name, mode) if 'w' in mode: - os.chmod(name, 0600) + os.chmod(name, 0o600) return f def option_dict(options): Modified: python/branches/cpy_merge/Tools/pybench/Numbers.py ============================================================================== --- python/branches/cpy_merge/Tools/pybench/Numbers.py (original) +++ python/branches/cpy_merge/Tools/pybench/Numbers.py Thu Jun 14 21:06:29 2007 @@ -598,185 +598,185 @@ for i in range(self.rounds): - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L - - 1234567890L < 3456789012345L - 1234567890L > 3456789012345L - 1234567890L == 3456789012345L - 1234567890L > 3456789012345L - 1234567890L < 3456789012345L + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 + + 1234567890 < 3456789012345 + 1234567890 > 3456789012345 + 1234567890 == 3456789012345 + 1234567890 > 3456789012345 + 1234567890 < 3456789012345 def calibrate(self): Modified: python/branches/cpy_merge/Tools/pybench/systimes.py ============================================================================== --- python/branches/cpy_merge/Tools/pybench/systimes.py (original) +++ python/branches/cpy_merge/Tools/pybench/systimes.py Thu Jun 14 21:06:29 2007 @@ -180,9 +180,9 @@ ### Testing def some_workload(): - x = 0L - for i in range(10000000L): - x = x + 1L + x = 0 + for i in range(10000000): + x = x + 1 def test_workload(): print 'Testing systimes() under load conditions' Modified: python/branches/cpy_merge/Tools/scripts/classfix.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/classfix.py (original) +++ python/branches/cpy_merge/Tools/scripts/classfix.py Thu Jun 14 21:06:29 2007 @@ -129,7 +129,7 @@ # First copy the file's mode to the temp file try: statbuf = os.stat(filename) - os.chmod(tempname, statbuf[ST_MODE] & 07777) + os.chmod(tempname, statbuf[ST_MODE] & 0o7777) except os.error as msg: err('%s: warning: chmod failed (%r)\n' % (tempname, msg)) # Then make a backup of the original file as filename~ Modified: python/branches/cpy_merge/Tools/scripts/fixcid.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/fixcid.py (original) +++ python/branches/cpy_merge/Tools/scripts/fixcid.py Thu Jun 14 21:06:29 2007 @@ -174,7 +174,7 @@ # First copy the file's mode to the temp file try: statbuf = os.stat(filename) - os.chmod(tempname, statbuf[ST_MODE] & 07777) + os.chmod(tempname, statbuf[ST_MODE] & 0o7777) except os.error as msg: err(tempname + ': warning: chmod failed (' + str(msg) + ')\n') # Then make a backup of the original file as filename~ Modified: python/branches/cpy_merge/Tools/scripts/ftpmirror.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/ftpmirror.py (original) +++ python/branches/cpy_merge/Tools/scripts/ftpmirror.py Thu Jun 14 21:06:29 2007 @@ -375,7 +375,7 @@ return dirname = os.path.dirname(pathname) if dirname: makedir(dirname) - os.mkdir(pathname, 0777) + os.mkdir(pathname, 0o777) # Write a dictionary to a file in a way that can be read back using # rval() but is still somewhat readable (i.e. not a single long line). Modified: python/branches/cpy_merge/Tools/scripts/linktree.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/linktree.py (original) +++ python/branches/cpy_merge/Tools/scripts/linktree.py Thu Jun 14 21:06:29 2007 @@ -31,7 +31,7 @@ print oldtree + ': not a directory' return 1 try: - os.mkdir(newtree, 0777) + os.mkdir(newtree, 0o777) except os.error as msg: print newtree + ': cannot mkdir:', msg return 1 @@ -63,7 +63,7 @@ if os.path.isdir(oldname) and \ not os.path.islink(oldname): try: - os.mkdir(newname, 0777) + os.mkdir(newname, 0o777) ok = 1 except: print newname + \ Modified: python/branches/cpy_merge/Tools/scripts/methfix.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/methfix.py (original) +++ python/branches/cpy_merge/Tools/scripts/methfix.py Thu Jun 14 21:06:29 2007 @@ -140,7 +140,7 @@ # First copy the file's mode to the temp file try: statbuf = os.stat(filename) - os.chmod(tempname, statbuf[ST_MODE] & 07777) + os.chmod(tempname, statbuf[ST_MODE] & 0o7777) except os.error as msg: err('%s: warning: chmod failed (%r)\n' % (tempname, msg)) # Then make a backup of the original file as filename~ Modified: python/branches/cpy_merge/Tools/scripts/pathfix.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/pathfix.py (original) +++ python/branches/cpy_merge/Tools/scripts/pathfix.py Thu Jun 14 21:06:29 2007 @@ -121,7 +121,7 @@ # First copy the file's mode to the temp file try: statbuf = os.stat(filename) - os.chmod(tempname, statbuf[ST_MODE] & 07777) + os.chmod(tempname, statbuf[ST_MODE] & 0o7777) except os.error as msg: err('%s: warning: chmod failed (%r)\n' % (tempname, msg)) # Then make a backup of the original file as filename~ Modified: python/branches/cpy_merge/Tools/scripts/which.py ============================================================================== --- python/branches/cpy_merge/Tools/scripts/which.py (original) +++ python/branches/cpy_merge/Tools/scripts/which.py Thu Jun 14 21:06:29 2007 @@ -35,7 +35,7 @@ msg(filename + ': not a disk file') else: mode = S_IMODE(st[ST_MODE]) - if mode & 0111: + if mode & 0o111: if not ident: print filename ident = st[:3] Modified: python/branches/cpy_merge/Tools/unicode/makeunicodedata.py ============================================================================== --- python/branches/cpy_merge/Tools/unicode/makeunicodedata.py (original) +++ python/branches/cpy_merge/Tools/unicode/makeunicodedata.py Thu Jun 14 21:06:29 2007 @@ -757,7 +757,7 @@ h = 0 for c in map(ord, s.upper()): h = (h * magic) + c - ix = h & 0xff000000L + ix = h & 0xff000000 if ix: h = (h ^ ((ix>>24) & 0xff)) & 0x00ffffff return h Modified: python/branches/cpy_merge/Tools/versioncheck/pyversioncheck.py ============================================================================== --- python/branches/cpy_merge/Tools/versioncheck/pyversioncheck.py (original) +++ python/branches/cpy_merge/Tools/versioncheck/pyversioncheck.py Thu Jun 14 21:06:29 2007 @@ -1,5 +1,4 @@ """pyversioncheck - Module to help with checking versions""" -import types import rfc822 import urllib import sys @@ -35,7 +34,7 @@ def checkonly(package, url, version, verbose=0): if verbose >= VERBOSE_EACHFILE: print '%s:'%package - if type(url) == types.StringType: + if isinstance(url, str): ok, newversion, fp = _check1version(package, url, version, verbose) else: for u in url: Modified: python/branches/cpy_merge/Tools/webchecker/websucker.py ============================================================================== --- python/branches/cpy_merge/Tools/webchecker/websucker.py (original) +++ python/branches/cpy_merge/Tools/webchecker/websucker.py Thu Jun 14 21:06:29 2007 @@ -119,7 +119,7 @@ print "Huh? Don't know how to make dir", dir return makedirs(head) - os.mkdir(dir, 0777) + os.mkdir(dir, 0o777) if __name__ == '__main__': sys.exit(main() or 0) Modified: python/branches/cpy_merge/configure ============================================================================== --- python/branches/cpy_merge/configure (original) +++ python/branches/cpy_merge/configure Thu Jun 14 21:06:29 2007 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 53610 . +# From configure.in Revision: 54283 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.0. # @@ -3753,7 +3753,7 @@ # Check for unsupported systems case $ac_sys_system/$ac_sys_release in -Linux*/1*) +atheos*|Linux*/1*) echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. echo See README for details. exit 1;; Modified: python/branches/cpy_merge/configure.in ============================================================================== --- python/branches/cpy_merge/configure.in (original) +++ python/branches/cpy_merge/configure.in Thu Jun 14 21:06:29 2007 @@ -450,7 +450,7 @@ # Check for unsupported systems case $ac_sys_system/$ac_sys_release in -Linux*/1*) +atheos*|Linux*/1*) echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. echo See README for details. exit 1;; Modified: python/branches/cpy_merge/setup.py ============================================================================== --- python/branches/cpy_merge/setup.py (original) +++ python/branches/cpy_merge/setup.py Thu Jun 14 21:06:29 2007 @@ -1503,8 +1503,8 @@ def install(self): outfiles = install_lib.install(self) - self.set_file_modes(outfiles, 0644, 0755) - self.set_dir_modes(self.install_dir, 0755) + self.set_file_modes(outfiles, 0o644, 0o755) + self.set_dir_modes(self.install_dir, 0o755) return outfiles def set_file_modes(self, files, defaultMode, sharedLibMode): From python-checkins at python.org Thu Jun 14 22:26:10 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Thu, 14 Jun 2007 22:26:10 +0200 (CEST) Subject: [Python-checkins] r55973 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070614202610.561E91E400D@bag.python.org> Author: alexandre.vassalotti Date: Thu Jun 14 22:26:06 2007 New Revision: 55973 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Change the write method to return the number of bytes/characters written. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Thu Jun 14 22:26:06 2007 @@ -337,7 +337,7 @@ bytes_io_write(BytesIOObject *self, PyObject *args) { const char *bytes; - Py_ssize_t n; + Py_ssize_t len, n; if (self->buf == NULL) return err_closed(); @@ -345,10 +345,11 @@ if (!PyArg_ParseTuple(args, "t#:write", &bytes, &n)) return NULL; - if (write_bytes(self, bytes, n) == -1) + len = write_bytes(self, bytes, n); + if (len == -1) return NULL; - Py_RETURN_NONE; + return PyInt_FromSsize_t(len); } static PyObject * @@ -508,7 +509,9 @@ "Returns the new absolute position."); PyDoc_STRVAR(BytesIO_write_doc, -"write(str) -> None. Write string str to file."); +"write(str) -> int. Write string str to file.\n" +"\n" +"Return the number of bytes written."); PyDoc_STRVAR(BytesIO_writelines_doc, "writelines(sequence_of_strings) -> None. Write the strings to the file.\n" Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Thu Jun 14 22:26:06 2007 @@ -340,7 +340,7 @@ string_io_write(StringIOObject *self, PyObject *args) { const Py_UNICODE *ustr; - Py_ssize_t n; + Py_ssize_t len, n; if (self->buf == NULL) return err_closed(); @@ -350,10 +350,11 @@ " unicode strings", &ustr, &n)) return NULL; - if (write_str(self, ustr, n) == -1) + len = write_str(self, ustr, n); + if (len == -1) return NULL; - Py_RETURN_NONE; + return PyInt_FromSsize_t(len); } static PyObject * @@ -518,7 +519,9 @@ "Returns the new absolute position."); PyDoc_STRVAR(StringIO_write_doc, -"write(str) -> None. Write string str to file."); +"write(str) -> int. Write string str to file.\n" +"\n" +"Return the number of characters written."); PyDoc_STRVAR(StringIO_writelines_doc, "writelines(sequence_of_strings) -> None. Write the strings to the file.\n" From python-checkins at python.org Thu Jun 14 22:32:52 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Thu, 14 Jun 2007 22:32:52 +0200 (CEST) Subject: [Python-checkins] r55974 - python/branches/cpy_merge/Lib/io.py Message-ID: <20070614203252.300141E400C@bag.python.org> Author: alexandre.vassalotti Date: Thu Jun 14 22:32:50 2007 New Revision: 55974 Modified: python/branches/cpy_merge/Lib/io.py Log: Use the faster _string_io/_bytes_io if available. Modified: python/branches/cpy_merge/Lib/io.py ============================================================================== --- python/branches/cpy_merge/Lib/io.py (original) +++ python/branches/cpy_merge/Lib/io.py Thu Jun 14 22:32:50 2007 @@ -575,7 +575,7 @@ return True -class BytesIO(_MemoryIOMixin): +class _BytesIO(_MemoryIOMixin): """Buffered I/O implementation using a bytes buffer, like StringIO.""" @@ -587,6 +587,12 @@ buffer += inital_bytes _MemoryIOMixin.__init__(self, buffer) +# Use the faster implementation if available +try: + from _bytes_io import BytesIO +except ImportError: + BytesIO = _BytesIO + # XXX This should inherit from TextIOBase class StringIO(_MemoryIOMixin): @@ -612,6 +618,12 @@ def readinto(self, b: bytes) -> int: self._unsupported("readinto") +# Use the faster implementation if available +try: + from _string_io import StringIO +except ImportError: + StringIO = _StringIO + class BufferedReader(_BufferedIOMixin): From python-checkins at python.org Thu Jun 14 22:46:32 2007 From: python-checkins at python.org (martin.v.loewis) Date: Thu, 14 Jun 2007 22:46:32 +0200 (CEST) Subject: [Python-checkins] r55975 - python/trunk/PC/pyconfig.h Message-ID: <20070614204632.0F29D1E4003@bag.python.org> Author: martin.v.loewis Date: Thu Jun 14 22:46:25 2007 New Revision: 55975 Modified: python/trunk/PC/pyconfig.h Log: Patch #1734014: Use _I64_MAX instead of LLONG_MAX. Will backport to 2.5. Modified: python/trunk/PC/pyconfig.h ============================================================================== --- python/trunk/PC/pyconfig.h (original) +++ python/trunk/PC/pyconfig.h Thu Jun 14 22:46:25 2007 @@ -275,9 +275,9 @@ #define HAVE_LONG_LONG 1 #ifndef PY_LONG_LONG # define PY_LONG_LONG __int64 -# define PY_LLONG_MAX LLONG_MAX -# define PY_LLONG_MIN LLONG_MIN -# define PY_ULLONG_MAX ULLONG_MAX +# define PY_LLONG_MAX _I64_MAX +# define PY_LLONG_MIN _I64_MIN +# define PY_ULLONG_MAX _UI64_MAX #endif /* For Windows the Python core is in a DLL by default. Test From python-checkins at python.org Thu Jun 14 22:47:16 2007 From: python-checkins at python.org (martin.v.loewis) Date: Thu, 14 Jun 2007 22:47:16 +0200 (CEST) Subject: [Python-checkins] r55976 - python/branches/release25-maint/PC/pyconfig.h Message-ID: <20070614204716.BB82F1E4003@bag.python.org> Author: martin.v.loewis Date: Thu Jun 14 22:47:15 2007 New Revision: 55976 Modified: python/branches/release25-maint/PC/pyconfig.h Log: Patch #1734014: Use _I64_MAX instead of LLONG_MAX. Modified: python/branches/release25-maint/PC/pyconfig.h ============================================================================== --- python/branches/release25-maint/PC/pyconfig.h (original) +++ python/branches/release25-maint/PC/pyconfig.h Thu Jun 14 22:47:15 2007 @@ -262,9 +262,9 @@ #define HAVE_LONG_LONG 1 #ifndef PY_LONG_LONG # define PY_LONG_LONG __int64 -# define PY_LLONG_MAX LLONG_MAX -# define PY_LLONG_MIN LLONG_MIN -# define PY_ULLONG_MAX ULLONG_MAX +# define PY_LLONG_MAX _I64_MAX +# define PY_LLONG_MIN _I64_MIN +# define PY_ULLONG_MAX _UI64_MAX #endif /* For Windows the Python core is in a DLL by default. Test From python-checkins at python.org Thu Jun 14 23:10:26 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Thu, 14 Jun 2007 23:10:26 +0200 (CEST) Subject: [Python-checkins] r55977 - in python/branches/cpy_merge: Lib/_abcoll.py Lib/abc.py Lib/test/test_abc.py Lib/test/test_super.py Lib/test/test_urllib2_localnet.py Tools/buildbot/build-amd64.bat Tools/buildbot/clean-amd64.bat Tools/buildbot/external-amd64.bat Tools/buildbot/test-amd64.bat Message-ID: <20070614211026.E17031E4004@bag.python.org> Author: alexandre.vassalotti Date: Thu Jun 14 23:10:12 2007 New Revision: 55977 Added: python/branches/cpy_merge/Lib/_abcoll.py python/branches/cpy_merge/Lib/abc.py python/branches/cpy_merge/Lib/test/test_abc.py python/branches/cpy_merge/Lib/test/test_super.py python/branches/cpy_merge/Lib/test/test_urllib2_localnet.py python/branches/cpy_merge/Tools/buildbot/build-amd64.bat python/branches/cpy_merge/Tools/buildbot/clean-amd64.bat python/branches/cpy_merge/Tools/buildbot/external-amd64.bat python/branches/cpy_merge/Tools/buildbot/test-amd64.bat Log: Add new files from the merge in r55972. Added: python/branches/cpy_merge/Lib/_abcoll.py ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Lib/_abcoll.py Thu Jun 14 23:10:12 2007 @@ -0,0 +1,535 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Abstract Base Classes (ABCs) for collections, according to PEP 3119. + +DON'T USE THIS MODULE DIRECTLY! The classes here should be imported +via collections; they are defined here only to alleviate ceratin +bootstrapping issues. Unit tests are in test_collections. +""" + +from abc import ABCMeta, abstractmethod + +__all__ = ["Hashable", "Iterable", "Iterator", + "Sized", "Container", "Callable", + "Set", "MutableSet", + "Mapping", "MutableMapping", + "MappingView", "KeysView", "ItemsView", "ValuesView", + "Sequence", "MutableSequence", + ] + +### ONE-TRICK PONIES ### + +class Hashable(metaclass=ABCMeta): + + @abstractmethod + def __hash__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Hashable: + for B in C.__mro__: + if "__hash__" in B.__dict__: + if B.__dict__["__hash__"]: + return True + break + return NotImplemented + + +class Iterable(metaclass=ABCMeta): + + @abstractmethod + def __iter__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterable: + if any("__iter__" in B.__dict__ for B in C.__mro__): + return True + return NotImplemented + +Iterable.register(bytes) + + +class Iterator(metaclass=ABCMeta): + + @abstractmethod + def __next__(self): + raise StopIteration + + def __iter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterator: + if any("__next__" in B.__dict__ for B in C.__mro__): + return True + return NotImplemented + + +class Sized(metaclass=ABCMeta): + + @abstractmethod + def __len__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Sized: + if any("__len__" in B.__dict__ for B in C.__mro__): + return True + return NotImplemented + + +class Container(metaclass=ABCMeta): + + @abstractmethod + def __contains__(self, x): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Container: + if any("__contains__" in B.__dict__ for B in C.__mro__): + return True + return NotImplemented + + +class Callable(metaclass=ABCMeta): + + @abstractmethod + def __contains__(self, x): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Callable: + if any("__call__" in B.__dict__ for B in C.__mro__): + return True + return NotImplemented + + +### SETS ### + + +class Set(metaclass=ABCMeta): + + """A set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__ and __len__. + + To override the comparisons (presumably for speed, as the + semantics are fixed), all you have to do is redefine __le__ and + then the other operations will automatically follow suit. + """ + + @abstractmethod + def __contains__(self, value): + return False + + @abstractmethod + def __iter__(self): + while False: + yield None + + @abstractmethod + def __len__(self): + return 0 + + def __le__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) > len(other): + return False + for elem in self: + if elem not in other: + return False + return True + + def __lt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) < len(other) and self.__le__(other) + + def __eq__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) == len(other) and self.__le__(other) + + @classmethod + def _from_iterable(cls, it): + return frozenset(it) + + def __and__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + return self._from_iterable(value for value in other if value in self) + + def __or__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + return self._from_iterable(itertools.chain(self, other)) + + def __sub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in self + if value not in other) + + def __xor__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return (self - other) | (other - self) + + def _hash(self): + """Compute the hash value of a set. + + Note that we don't define __hash__: not all sets are hashable. + But if you define a hashable set type, its __hash__ should + call this function. + + This must be compatible __eq__. + + All sets ought to compare equal if they contain the same + elements, regardless of how they are implemented, and + regardless of the order of the elements; so there's not much + freedom for __eq__ or __hash__. We match the algorithm used + by the built-in frozenset type. + """ + MAX = sys.maxint + MASK = 2 * MAX + 1 + n = len(self) + h = 1927868237 * (n + 1) + h &= MASK + for x in self: + hx = hash(x) + h ^= (hx ^ (hx << 16) ^ 89869747) * 3644798167 + h &= MASK + h = h * 69069 + 907133923 + h &= MASK + if h > MAX: + h -= MASK + 1 + if h == -1: + h = 590923713 + return h + +Set.register(frozenset) + + +class MutableSet(Set): + + @abstractmethod + def add(self, value): + """Return True if it was added, False if already there.""" + raise NotImplementedError + + @abstractmethod + def discard(self, value): + """Return True if it was deleted, False if not there.""" + raise NotImplementedError + + def pop(self): + """Return the popped value. Raise KeyError if empty.""" + it = iter(self) + try: + value = it.__next__() + except StopIteration: + raise KeyError + self.discard(value) + return value + + def toggle(self, value): + """Return True if it was added, False if deleted.""" + # XXX This implementation is not thread-safe + if value in self: + self.discard(value) + return False + else: + self.add(value) + return True + + def clear(self): + """This is slow (creates N new iterators!) but effective.""" + try: + while True: + self.pop() + except KeyError: + pass + + def __ior__(self, it: Iterable): + for value in it: + self.add(value) + return self + + def __iand__(self, c: Container): + for value in self: + if value not in c: + self.discard(value) + return self + + def __ixor__(self, it: Iterable): + # This calls toggle(), so if that is overridded, we call the override + for value in it: + self.toggle(it) + return self + + def __isub__(self, it: Iterable): + for value in it: + self.discard(value) + return self + +MutableSet.register(set) + + +### MAPPINGS ### + + +class Mapping(metaclass=ABCMeta): + + @abstractmethod + def __getitem__(self, key): + raise KeyError + + def get(self, key, default=None): + try: + return self[key] + except KeyError: + return default + + def __contains__(self, key): + try: + self[key] + except KeyError: + return False + else: + return True + + @abstractmethod + def __len__(self): + return 0 + + @abstractmethod + def __iter__(self): + while False: + yield None + + def keys(self): + return KeysView(self) + + def items(self): + return ItemsView(self) + + def values(self): + return ValuesView(self) + + +class MappingView(metaclass=ABCMeta): + + def __init__(self, mapping): + self._mapping = mapping + + def __len__(self): + return len(self._mapping) + + +class KeysView(MappingView, Set): + + def __contains__(self, key): + return key in self._mapping + + def __iter__(self): + for key in self._mapping: + yield key + +KeysView.register(type({}.keys())) + + +class ItemsView(MappingView, Set): + + def __contains__(self, item): + key, value = item + try: + v = self._mapping[key] + except KeyError: + return False + else: + return v == value + + def __iter__(self): + for key in self._mapping: + yield (key, self._mapping[key]) + +ItemsView.register(type({}.items())) + + +class ValuesView(MappingView): + + def __contains__(self, value): + for key in self._mapping: + if value == self._mapping[key]: + return True + return False + + def __iter__(self): + for key in self._mapping: + yield self._mapping[key] + +ValuesView.register(type({}.values())) + + +class MutableMapping(Mapping): + + @abstractmethod + def __setitem__(self, key, value): + raise KeyError + + @abstractmethod + def __delitem__(self, key): + raise KeyError + + __marker = object() + + def pop(self, key, default=__marker): + try: + value = self[key] + except KeyError: + if default is self.__marker: + raise + return default + else: + del self[key] + return value + + def popitem(self): + try: + key = next(iter(self)) + except StopIteration: + raise KeyError + value = self[key] + del self[key] + return key, value + + def clear(self): + try: + while True: + self.popitem() + except KeyError: + pass + + def update(self, other=(), **kwds): + if isinstance(other, Mapping): + for key in other: + self[key] = other[key] + elif hasattr(other, "keys"): + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + +MutableMapping.register(dict) + + +### SEQUENCES ### + + +class Sequence(metaclass=ABCMeta): + + """All the operations on a read-only sequence. + + Concrete subclasses must override __new__ or __init__, + __getitem__, and __len__. + """ + + @abstractmethod + def __getitem__(self, index): + raise IndexError + + @abstractmethod + def __len__(self): + return 0 + + def __iter__(self): + i = 0 + while True: + try: + v = self[i] + except IndexError: + break + yield v + i += 1 + + def __contains__(self, value): + for v in self: + if v == value: + return True + return False + + def __reversed__(self): + for i in reversed(range(len(self))): + yield self[i] + + def index(self, value): + for i, v in enumerate(self): + if v == value: + return i + raise ValueError + + def count(self, value): + return sum(1 for v in self if v == value) + +Sequence.register(tuple) +Sequence.register(basestring) +Sequence.register(buffer) + + +class MutableSequence(Sequence): + + @abstractmethod + def __setitem__(self, index, value): + raise IndexError + + @abstractmethod + def __delitem__(self, index): + raise IndexError + + @abstractmethod + def insert(self, index, value): + raise IndexError + + def append(self, value): + self.insert(len(self), value) + + def reverse(self): + n = len(self) + for i in range(n//2): + self[i], self[n-i-1] = self[n-i-1], self[i] + + def extend(self, values): + for v in values: + self.append(v) + + def pop(self, index=-1): + v = self[index] + del self[index] + return v + + def remove(self, value): + del self[self.index(value)] + + def __iadd__(self, values): + self.extend(values) + +MutableSequence.register(list) +MutableSequence.register(bytes) Added: python/branches/cpy_merge/Lib/abc.py ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Lib/abc.py Thu Jun 14 23:10:12 2007 @@ -0,0 +1,179 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Abstract Base Classes (ABCs) according to PEP 3119.""" + + +def abstractmethod(funcobj): + """A decorator indicating abstract methods. + + Requires that the metaclass is ABCMeta or derived from it. A + class that has a metaclass derived from ABCMeta cannot be + instantiated unless all of its abstract methods are overridden. + The abstract methods can be called using any of the the normal + 'super' call mechanisms. + + Usage: + + class C(metaclass=ABCMeta): + @abstractmethod + def my_abstract_method(self, ...): + ... + """ + funcobj.__isabstractmethod__ = True + return funcobj + + +class _Abstract(object): + + """Helper class inserted into the bases by ABCMeta (using _fix_bases()). + + You should never need to explicitly subclass this class. + + There should never be a base class between _Abstract and object. + """ + + def __new__(cls, *args, **kwds): + am = cls.__dict__.get("__abstractmethods__") + if am: + raise TypeError("Can't instantiate abstract class %s " + "with abstract methods %s" % + (cls.__name__, ", ".join(sorted(am)))) + if (args or kwds) and cls.__init__ is object.__init__: + raise TypeError("Can't pass arguments to __new__ " + "without overriding __init__") + return object.__new__(cls) + + @classmethod + def __subclasshook__(cls, subclass): + """Abstract classes can override this to customize issubclass(). + + This is invoked early on by __subclasscheck__() below. It + should return True, False or NotImplemented. If it returns + NotImplemented, the normal algorithm is used. Otherwise, it + overrides the normal algorithm (and the outcome is cached). + """ + return NotImplemented + + +def _fix_bases(bases): + """Helper method that inserts _Abstract in the bases if needed.""" + for base in bases: + if issubclass(base, _Abstract): + # _Abstract is already a base (maybe indirectly) + return bases + if object in bases: + # Replace object with _Abstract + return tuple([_Abstract if base is object else base + for base in bases]) + # Append _Abstract to the end + return bases + (_Abstract,) + + +class ABCMeta(type): + + """Metaclass for defining Abstract Base Classes (ABCs). + + Use this metaclass to create an ABC. An ABC can be subclassed + directly, and then acts as a mix-in class. You can also register + unrelated concrete classes (even built-in classes) and unrelated + ABCs as 'virtual subclasses' -- these and their descendants will + be considered subclasses of the registering ABC by the built-in + issubclass() function, but the registering ABC won't show up in + their MRO (Method Resolution Order) nor will method + implementations defined by the registering ABC be callable (not + even via super()). + + """ + + # A global counter that is incremented each time a class is + # registered as a virtual subclass of anything. It forces the + # negative cache to be cleared before its next use. + __invalidation_counter = 0 + + def __new__(mcls, name, bases, namespace): + bases = _fix_bases(bases) + cls = super().__new__(mcls, name, bases, namespace) + # Compute set of abstract method names + abstracts = {name + for name, value in namespace.items() + if getattr(value, "__isabstractmethod__", False)} + for base in bases: + for name in getattr(base, "__abstractmethods__", set()): + value = getattr(cls, name, None) + if getattr(value, "__isabstractmethod__", False): + abstracts.add(name) + cls.__abstractmethods__ = abstracts + # Set up inheritance registry + cls.__registry = set() + cls.__cache = set() + cls.__negative_cache = set() + cls.__negative_cache_version = ABCMeta.__invalidation_counter + return cls + + def register(cls, subclass): + """Register a virtual subclass of an ABC.""" + if not isinstance(cls, type): + raise TypeError("Can only register classes") + if issubclass(subclass, cls): + return # Already a subclass + # Subtle: test for cycles *after* testing for "already a subclass"; + # this means we allow X.register(X) and interpret it as a no-op. + if issubclass(cls, subclass): + # This would create a cycle, which is bad for the algorithm below + raise RuntimeError("Refusing to create an inheritance cycle") + cls.__registry.add(subclass) + ABCMeta.__invalidation_counter += 1 # Invalidate negative cache + + def _dump_registry(cls, file=None): + """Debug helper to print the ABC registry.""" + print("Class: %s.%s" % (cls.__module__, cls.__name__), file=file) + print("Inv.counter: %s" % ABCMeta.__invalidation_counter, file=file) + for name in sorted(cls.__dict__.keys()): + if name.startswith("__abc_"): + value = getattr(cls, name) + print("%s: %r" % (name, value), file=file) + + def __instancecheck__(cls, instance): + """Override for isinstance(instance, cls).""" + return any(cls.__subclasscheck__(c) + for c in {instance.__class__, type(instance)}) + + def __subclasscheck__(cls, subclass): + """Override for issubclass(subclass, cls).""" + # Check cache + if subclass in cls.__cache: + return True + # Check negative cache; may have to invalidate + if cls.__negative_cache_version < ABCMeta.__invalidation_counter: + # Invalidate the negative cache + cls.__negative_cache_version = ABCMeta.__invalidation_counter + cls.__negative_cache = set() + elif subclass in cls.__negative_cache: + return False + # Check the subclass hook + ok = cls.__subclasshook__(subclass) + if ok is not NotImplemented: + assert isinstance(ok, bool) + if ok: + cls.__cache.add(subclass) + else: + cls.__negative_cache.add(subclass) + return ok + # Check if it's a direct subclass + if cls in subclass.__mro__: + cls.__cache.add(subclass) + return True + # Check if it's a subclass of a registered class (recursive) + for rcls in cls.__registry: + if issubclass(subclass, rcls): + cls.__registry.add(subclass) + return True + # Check if it's a subclass of a subclass (recursive) + for scls in cls.__subclasses__(): + if issubclass(subclass, scls): + cls.__registry.add(subclass) + return True + # No dice; update negative cache + cls.__negative_cache.add(subclass) + return False Added: python/branches/cpy_merge/Lib/test/test_abc.py ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Lib/test/test_abc.py Thu Jun 14 23:10:12 2007 @@ -0,0 +1,123 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Unit tests for abc.py.""" + +import sys +import unittest +from test import test_support + +import abc + + +class TestABC(unittest.TestCase): + + def test_abstractmethod_basics(self): + @abc.abstractmethod + def foo(self): pass + self.assertEqual(foo.__isabstractmethod__, True) + def bar(self): pass + self.assertEqual(hasattr(bar, "__isabstractmethod__"), False) + + def test_abstractmethod_integration(self): + class C(metaclass=abc.ABCMeta): + @abc.abstractmethod + def foo(self): pass # abstract + def bar(self): pass # concrete + self.assertEqual(C.__abstractmethods__, {"foo"}) + self.assertRaises(TypeError, C) # because foo is abstract + class D(C): + def bar(self): pass # concrete override of concrete + self.assertEqual(D.__abstractmethods__, {"foo"}) + self.assertRaises(TypeError, D) # because foo is still abstract + class E(D): + def foo(self): pass + self.assertEqual(E.__abstractmethods__, set()) + E() # now foo is concrete, too + class F(E): + @abc.abstractmethod + def bar(self): pass # abstract override of concrete + self.assertEqual(F.__abstractmethods__, {"bar"}) + self.assertRaises(TypeError, F) # because bar is abstract now + + def test_registration_basics(self): + class A(metaclass=abc.ABCMeta): + pass + class B: + pass + b = B() + self.assertEqual(issubclass(B, A), False) + self.assertEqual(isinstance(b, A), False) + A.register(B) + self.assertEqual(issubclass(B, A), True) + self.assertEqual(isinstance(b, A), True) + class C(B): + pass + c = C() + self.assertEqual(issubclass(C, A), True) + self.assertEqual(isinstance(c, A), True) + + def test_registration_builtins(self): + class A(metaclass=abc.ABCMeta): + pass + A.register(int) + self.assertEqual(isinstance(42, A), True) + self.assertEqual(issubclass(int, A), True) + class B(A): + pass + B.register(basestring) + self.assertEqual(isinstance("", A), True) + self.assertEqual(issubclass(str, A), True) + + def test_registration_edge_cases(self): + class A(metaclass=abc.ABCMeta): + pass + A.register(A) # should pass silently + class A1(A): + pass + self.assertRaises(RuntimeError, A1.register, A) # cycles not allowed + class B: + pass + A1.register(B) # ok + A1.register(B) # should pass silently + class C(A): + pass + A.register(C) # should pass silently + self.assertRaises(RuntimeError, C.register, A) # cycles not allowed + C.register(B) # ok + + def test_registration_transitiveness(self): + class A(metaclass=abc.ABCMeta): + pass + self.failUnless(issubclass(A, A)) + class B(metaclass=abc.ABCMeta): + pass + self.failIf(issubclass(A, B)) + self.failIf(issubclass(B, A)) + class C(metaclass=abc.ABCMeta): + pass + A.register(B) + class B1(B): + pass + self.failUnless(issubclass(B1, A)) + class C1(C): + pass + B1.register(C1) + self.failIf(issubclass(C, B)) + self.failIf(issubclass(C, B1)) + self.failUnless(issubclass(C1, A)) + self.failUnless(issubclass(C1, B)) + self.failUnless(issubclass(C1, B1)) + C1.register(int) + class MyInt(int): + pass + self.failUnless(issubclass(MyInt, A)) + self.failUnless(isinstance(42, A)) + + +def test_main(): + test_support.run_unittest(TestABC) + + +if __name__ == "__main__": + unittest.main() Added: python/branches/cpy_merge/Lib/test/test_super.py ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Lib/test/test_super.py Thu Jun 14 23:10:12 2007 @@ -0,0 +1,79 @@ +"""Unit tests for new super() implementation.""" + +import sys +import unittest +from test import test_support + + +class A: + def f(self): + return 'A' + @classmethod + def cm(cls): + return (cls, 'A') + +class B(A): + def f(self): + return super().f() + 'B' + @classmethod + def cm(cls): + return (cls, super().cm(), 'B') + +class C(A): + def f(self): + return super().f() + 'C' + @classmethod + def cm(cls): + return (cls, super().cm(), 'C') + +class D(C, B): + def f(self): + return super().f() + 'D' + def cm(cls): + return (cls, super().cm(), 'D') + +class E(D): + pass + +class F(E): + f = E.f + +class G(A): + pass + + +class TestSuper(unittest.TestCase): + + def testBasicsWorking(self): + self.assertEqual(D().f(), 'ABCD') + + def testClassGetattrWorking(self): + self.assertEqual(D.f(D()), 'ABCD') + + def testSubclassNoOverrideWorking(self): + self.assertEqual(E().f(), 'ABCD') + self.assertEqual(E.f(E()), 'ABCD') + + def testUnboundMethodTransferWorking(self): + self.assertEqual(F().f(), 'ABCD') + self.assertEqual(F.f(F()), 'ABCD') + + def testClassMethodsStillWorking(self): + self.assertEqual(A.cm(), (A, 'A')) + self.assertEqual(A().cm(), (A, 'A')) + self.assertEqual(G.cm(), (G, 'A')) + self.assertEqual(G().cm(), (G, 'A')) + + def testSuperInClassMethodsWorking(self): + d = D() + self.assertEqual(d.cm(), (d, (D, (D, (D, 'A'), 'B'), 'C'), 'D')) + e = E() + self.assertEqual(e.cm(), (e, (E, (E, (E, 'A'), 'B'), 'C'), 'D')) + + +def test_main(): + test_support.run_unittest(TestSuper) + + +if __name__ == "__main__": + unittest.main() Added: python/branches/cpy_merge/Lib/test/test_urllib2_localnet.py ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Lib/test/test_urllib2_localnet.py Thu Jun 14 23:10:12 2007 @@ -0,0 +1,310 @@ +#!/usr/bin/env python + +import sys +import threading +import urlparse +import urllib2 +import BaseHTTPServer +import unittest +import hashlib +from test import test_support + +# Loopback http server infrastructure + +class LoopbackHttpServer(BaseHTTPServer.HTTPServer): + """HTTP server w/ a few modifications that make it useful for + loopback testing purposes. + """ + + def __init__(self, server_address, RequestHandlerClass): + BaseHTTPServer.HTTPServer.__init__(self, + server_address, + RequestHandlerClass) + + # Set the timeout of our listening socket really low so + # that we can stop the server easily. + self.socket.settimeout(1.0) + + def get_request(self): + """BaseHTTPServer method, overridden.""" + + request, client_address = self.socket.accept() + + # It's a loopback connection, so setting the timeout + # really low shouldn't affect anything, but should make + # deadlocks less likely to occur. + request.settimeout(10.0) + + return (request, client_address) + +class LoopbackHttpServerThread(threading.Thread): + """Stoppable thread that runs a loopback http server.""" + + def __init__(self, port, RequestHandlerClass): + threading.Thread.__init__(self) + self._RequestHandlerClass = RequestHandlerClass + self._stop = False + self._port = port + self._server_address = ('127.0.0.1', self._port) + self.ready = threading.Event() + self.error = None + + def stop(self): + """Stops the webserver if it's currently running.""" + + # Set the stop flag. + self._stop = True + + self.join() + + def run(self): + protocol = "HTTP/1.0" + + try: + self._RequestHandlerClass.protocol_version = protocol + httpd = LoopbackHttpServer(self._server_address, + self._RequestHandlerClass) + + sa = httpd.socket.getsockname() + #print "Serving HTTP on", sa[0], "port", sa[1], "..." + except: + # Fail "gracefully" if we are unable to start. + self.ready.set() + self.error = sys.exc_info()[1] + raise + + self.ready.set() + while not self._stop: + httpd.handle_request() + +# Authentication infrastructure + +class DigestAuthHandler: + """Handler for performing digest authentication.""" + + def __init__(self): + self._request_num = 0 + self._nonces = [] + self._users = {} + self._realm_name = "Test Realm" + self._qop = "auth" + + def set_qop(self, qop): + self._qop = qop + + def set_users(self, users): + assert isinstance(users, dict) + self._users = users + + def set_realm(self, realm): + self._realm_name = realm + + def _generate_nonce(self): + self._request_num += 1 + nonce = hashlib.md5(str(self._request_num)).hexdigest() + self._nonces.append(nonce) + return nonce + + def _create_auth_dict(self, auth_str): + first_space_index = auth_str.find(" ") + auth_str = auth_str[first_space_index+1:] + + parts = auth_str.split(",") + + auth_dict = {} + for part in parts: + name, value = part.split("=") + name = name.strip() + if value[0] == '"' and value[-1] == '"': + value = value[1:-1] + else: + value = value.strip() + auth_dict[name] = value + return auth_dict + + def _validate_auth(self, auth_dict, password, method, uri): + final_dict = {} + final_dict.update(auth_dict) + final_dict["password"] = password + final_dict["method"] = method + final_dict["uri"] = uri + HA1_str = "%(username)s:%(realm)s:%(password)s" % final_dict + HA1 = hashlib.md5(HA1_str).hexdigest() + HA2_str = "%(method)s:%(uri)s" % final_dict + HA2 = hashlib.md5(HA2_str).hexdigest() + final_dict["HA1"] = HA1 + final_dict["HA2"] = HA2 + response_str = "%(HA1)s:%(nonce)s:%(nc)s:" \ + "%(cnonce)s:%(qop)s:%(HA2)s" % final_dict + response = hashlib.md5(response_str).hexdigest() + + return response == auth_dict["response"] + + def _return_auth_challenge(self, request_handler): + request_handler.send_response(407, "Proxy Authentication Required") + request_handler.send_header("Content-Type", "text/html") + request_handler.send_header( + 'Proxy-Authenticate', 'Digest realm="%s", ' + 'qop="%s",' + 'nonce="%s", ' % \ + (self._realm_name, self._qop, self._generate_nonce())) + # XXX: Not sure if we're supposed to add this next header or + # not. + #request_handler.send_header('Connection', 'close') + request_handler.end_headers() + request_handler.wfile.write("Proxy Authentication Required.") + return False + + def handle_request(self, request_handler): + """Performs digest authentication on the given HTTP request + handler. Returns True if authentication was successful, False + otherwise. + + If no users have been set, then digest auth is effectively + disabled and this method will always return True. + """ + + if len(self._users) == 0: + return True + + if 'Proxy-Authorization' not in request_handler.headers: + return self._return_auth_challenge(request_handler) + else: + auth_dict = self._create_auth_dict( + request_handler.headers['Proxy-Authorization'] + ) + if auth_dict["username"] in self._users: + password = self._users[ auth_dict["username"] ] + else: + return self._return_auth_challenge(request_handler) + if not auth_dict.get("nonce") in self._nonces: + return self._return_auth_challenge(request_handler) + else: + self._nonces.remove(auth_dict["nonce"]) + + auth_validated = False + + # MSIE uses short_path in its validation, but Python's + # urllib2 uses the full path, so we're going to see if + # either of them works here. + + for path in [request_handler.path, request_handler.short_path]: + if self._validate_auth(auth_dict, + password, + request_handler.command, + path): + auth_validated = True + + if not auth_validated: + return self._return_auth_challenge(request_handler) + return True + +# Proxy test infrastructure + +class FakeProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): + """This is a 'fake proxy' that makes it look like the entire + internet has gone down due to a sudden zombie invasion. It main + utility is in providing us with authentication support for + testing. + """ + + digest_auth_handler = DigestAuthHandler() + + def log_message(self, format, *args): + # Uncomment the next line for debugging. + #sys.stderr.write(format % args) + pass + + def do_GET(self): + (scm, netloc, path, params, query, fragment) = urlparse.urlparse( + self.path, 'http') + self.short_path = path + if self.digest_auth_handler.handle_request(self): + self.send_response(200, "OK") + self.send_header("Content-Type", "text/html") + self.end_headers() + self.wfile.write("You've reached %s!
" % self.path) + self.wfile.write("Our apologies, but our server is down due to " + "a sudden zombie invasion.") + +# Test cases + +class ProxyAuthTests(unittest.TestCase): + URL = "http://www.foo.com" + + PORT = 8080 + USER = "tester" + PASSWD = "test123" + REALM = "TestRealm" + + PROXY_URL = "http://127.0.0.1:%d" % PORT + + def setUp(self): + FakeProxyHandler.digest_auth_handler.set_users({ + self.USER : self.PASSWD + }) + FakeProxyHandler.digest_auth_handler.set_realm(self.REALM) + + self.server = LoopbackHttpServerThread(self.PORT, FakeProxyHandler) + self.server.start() + self.server.ready.wait() + if self.server.error: + raise self.server.error + + handler = urllib2.ProxyHandler({"http" : self.PROXY_URL}) + self._digest_auth_handler = urllib2.ProxyDigestAuthHandler() + self.opener = urllib2.build_opener(handler, self._digest_auth_handler) + + def tearDown(self): + self.server.stop() + + def test_proxy_with_bad_password_raises_httperror(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD+"bad") + FakeProxyHandler.digest_auth_handler.set_qop("auth") + self.assertRaises(urllib2.HTTPError, + self.opener.open, + self.URL) + + def test_proxy_with_no_password_raises_httperror(self): + FakeProxyHandler.digest_auth_handler.set_qop("auth") + self.assertRaises(urllib2.HTTPError, + self.opener.open, + self.URL) + + def test_proxy_qop_auth_works(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD) + FakeProxyHandler.digest_auth_handler.set_qop("auth") + result = self.opener.open(self.URL) + while result.read(): + pass + result.close() + + def test_proxy_qop_auth_int_works_or_throws_urlerror(self): + self._digest_auth_handler.add_password(self.REALM, self.URL, + self.USER, self.PASSWD) + FakeProxyHandler.digest_auth_handler.set_qop("auth-int") + try: + result = self.opener.open(self.URL) + except urllib2.URLError: + # It's okay if we don't support auth-int, but we certainly + # shouldn't receive any kind of exception here other than + # a URLError. + result = None + if result: + while result.read(): + pass + result.close() + +def test_main(): + # We will NOT depend on the network resource flag + # (Lib/test/regrtest.py -u network) since all tests here are only + # localhost. However, if this is a bad rationale, then uncomment + # the next line. + #test_support.requires("network") + + test_support.run_unittest(ProxyAuthTests) + +if __name__ == "__main__": + test_main() Added: python/branches/cpy_merge/Tools/buildbot/build-amd64.bat ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Tools/buildbot/build-amd64.bat Thu Jun 14 23:10:12 2007 @@ -0,0 +1,6 @@ + at rem Used by the buildbot "compile" step. +setlocal +cmd /c Tools\buildbot\external-amd64.bat +call "%VS71COMNTOOLS%vsvars32.bat" +REM cmd /q/c Tools\buildbot\kill_python.bat +devenv.com /build ReleaseAMD64 PCbuild\pcbuild.sln Added: python/branches/cpy_merge/Tools/buildbot/clean-amd64.bat ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Tools/buildbot/clean-amd64.bat Thu Jun 14 23:10:12 2007 @@ -0,0 +1,6 @@ + at rem Used by the buildbot "clean" step. +call "%VS71COMNTOOLS%vsvars32.bat" +cd PCbuild + at echo Deleting .pyc/.pyo files ... +python.exe rmpyc.py +devenv.com /clean ReleaseAMD64 pcbuild.sln Added: python/branches/cpy_merge/Tools/buildbot/external-amd64.bat ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Tools/buildbot/external-amd64.bat Thu Jun 14 23:10:12 2007 @@ -0,0 +1,44 @@ + at rem Fetches (and builds if necessary) external dependencies +setlocal + + at rem need this so that 'devenv' is found +call "%VS71COMNTOOLS%vsvars32.bat" + at rem set the build environment +call "%MSSdk%\SetEnv" /XP64 /RETAIL + + at rem Assume we start inside the Python source directory +cd .. + + at rem sqlite +if not exist sqlite-source-3.3.4 ( + svn export http://svn.python.org/projects/external/sqlite-source-3.3.4 + if exist build\PCbuild\sqlite3.dll del build\PCbuild\sqlite3.dll +) +if not exist build\PCbuild\sqlite3.dll ( + cd sqlite-source-3.3.4\amd64 + cl ..\*.c + link /def:..\sqlite3.def /dll *.obj /out:sqlite3.dll bufferoverflowU.lib + cd ..\.. + copy sqlite-source-3.3.4\amd64\sqlite3.dll build\PCbuild +) + + at rem bzip +if not exist bzip2-1.0.3 svn export http://svn.python.org/projects/external/bzip2-1.0.3 + + at rem Sleepycat db +if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20 +if not exist "db-4.4.20\build_win32\Release_AMD64\libdb44s.lib" ( + cd db-4.4.20\build_win32 + devenv Berkeley_DB.sln /build "Release AMD64" /project db_static /useenv + cd ..\.. +) + + at rem OpenSSL +if not exist openssl-0.9.8a svn export http://svn.python.org/projects/external/openssl-0.9.8a + + at rem tcltk +if not exist tcl8.4.12 ( + if exist tcltk rd /s/q tcltk + svn export http://svn.python.org/projects/external/tcl8.4.12 + svn export http://svn.python.org/projects/external/tk8.4.12 +) Added: python/branches/cpy_merge/Tools/buildbot/test-amd64.bat ============================================================================== --- (empty file) +++ python/branches/cpy_merge/Tools/buildbot/test-amd64.bat Thu Jun 14 23:10:12 2007 @@ -0,0 +1,3 @@ + at rem Used by the buildbot "test" step. +cd PCbuild +call rt.bat -q -uall -rw From buildbot at python.org Thu Jun 14 23:14:32 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 14 Jun 2007 21:14:32 +0000 Subject: [Python-checkins] buildbot warnings in amd64 XP trunk Message-ID: <20070614211432.E32BF1E4003@bag.python.org> The Buildbot has detected a new failure of amd64 XP trunk. Full details are available at: http://www.python.org/dev/buildbot/all/amd64%2520XP%2520trunk/builds/27 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch trunk] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 2 tests failed: test_ctypes test_winsound ====================================================================== FAIL: test_alias_nofallback (test.test_winsound.PlaySoundTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_winsound.py", line 151, in test_alias_nofallback '!"$%&/(#+*', winsound.SND_ALIAS | winsound.SND_NODEFAULT AssertionError: RuntimeError not raised ====================================================================== FAIL: test_stopasync (test.test_winsound.PlaySoundTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\test\test_winsound.py", line 175, in test_stopasync None, winsound.SND_PURGE AssertionError: RuntimeError not raised Traceback (most recent call last): File "C:\buildbot\trunk.heller-windows-amd64\build\lib\threading.py", line 465, in __bootstrap self.run() File "C:\buildbot\trunk.heller-windows-amd64\build\lib\threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "C:\buildbot\trunk.heller-windows-amd64\build\lib\bsddb\test\test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "C:\buildbot\trunk.heller-windows-amd64\build\lib\bsddb\dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30995, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') sincerely, -The Buildbot From nnorwitz at gmail.com Thu Jun 14 23:13:13 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 14 Jun 2007 17:13:13 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070614211313.GA7572@python.psfb.org> test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From nnorwitz at gmail.com Thu Jun 14 23:31:58 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 14 Jun 2007 17:31:58 -0400 Subject: [Python-checkins] Python Regression Test Failures all (1) Message-ID: <20070614213158.GA23339@python.psfb.org> test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_unittest test_doctest test_doctest2 test_MimeWriter test_StringIO test___all__ test___future__ test__locale test_aepack test_aepack skipped -- No module named aepack test_al test_al skipped -- No module named al test_anydbm test_applesingle test_applesingle skipped -- No module named macostools test_array test_ast test_asynchat test_atexit test_audioop test_augassign test_base64 test_bastion test_bigaddrspace test_bigmem test_binascii test_binhex test_binop test_bisect test_bool test_bsddb test_bsddb185 test_bsddb185 skipped -- No module named bsddb185 test_bsddb3 test test_bsddb3 failed -- errors occurred; run in verbose mode for details test_bufio test_bz2 test_cProfile test_calendar test_call test_capi test_cd test_cd skipped -- No module named cd test_cfgparser test_cgi test_charmapcodec test_cl test_cl skipped -- No module named cl test_class test_cmath test_cmd_line test_code test_codeccallbacks test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_codecs test_codeop test_coding test_coercion test_collections test_colorsys test_commands test_compare test_compile test_compiler testCompileLibrary still working, be patient... test_complex test_complex_args test_contains test_contextlib test_cookie test_cookielib test_copy test_copy_reg test_cpickle test_crypt test_csv test_ctypes test_datetime test_dbm test_decimal test_decorators test_defaultdict test_deque test_descr test_descrtut test_difflib test_dircache test_dis test_distutils test_dl test_dumbdbm test_dummy_thread test_dummy_threading test_email test_email_codecs test_email_renamed test_enumerate test_eof test_errno test_exception_variations test_extcall test_fcntl test_file test_filecmp test_fileinput test_float test_fnmatch test_fork1 test_format test_fpformat test_frozen test_ftplib test_funcattrs test_functools test_future test_gc test_gdbm test_generators test_genericpath test_genexps test_getargs test_getargs2 test_getopt test_gettext test_gl test_gl skipped -- No module named gl test_glob test_global test_grp test_gzip test_hash test_hashlib test_heapq test_hexoct test_hmac test_hotshot test_htmllib test_htmlparser test_httplib test_imageop test_imageop skipped -- No module named imgfile test_imaplib test_imgfile test_imgfile skipped -- No module named imgfile test_imp test_import test_importhooks test_index test_inspect test_ioctl test_ioctl skipped -- Unable to open /dev/tty test_isinstance test_iter test_iterlen test_itertools test_largefile test_list test_locale test_logging test_long test_long_future test_longexp test_macostools test_macostools skipped -- No module named macostools test_macpath test_mailbox test_marshal test_math test_md5 test_mhlib test_mimetools test_mimetypes test_minidom test_mmap test_module test_modulefinder test_multibytecodec test_multibytecodec_support test_multifile test_mutants test_netrc test_new test_nis test_normalization test_ntpath test_old_mailbox test_openpty test_operator test_optparse test_os test_parser test_peepholer test_pep247 test_pep263 test_pep277 test_pep277 skipped -- test works only on NT+ test_pep292 test_pep352 test_pickle test_pickletools test_pkg test_pkgimport test_platform test_plistlib test_plistlib skipped -- No module named plistlib test_poll test_popen [7328 refs] [7328 refs] [7328 refs] test_popen2 test_poplib test_posix test_posixpath test_pow test_pprint test_profile test_profilehooks test_pty test_pwd test_pyclbr test_pyexpat test_queue test_quopri [7703 refs] [7703 refs] test_random test_re test_repr test_resource test_rfc822 test_richcmp test_robotparser test_runpy test_sax test_scope test_scriptpackages test_scriptpackages skipped -- No module named aetools test_select test_set test_sets test_sgmllib test_sha test_shelve test_shlex test_shutil test_signal test_site test_slice test_smtplib test_socket test_socket_ssl test_socketserver test_softspace test_sort test_sqlite test_startfile test_startfile skipped -- cannot import name startfile test_str test_strftime test_string test_stringprep test_strop test_strptime test_struct test_structmembers test_structseq test_subprocess [7323 refs] [7321 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7321 refs] [8869 refs] [7539 refs] [7324 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] . [7323 refs] [7323 refs] this bit of output is from a test of stdout in a different process ... [7323 refs] [7323 refs] [7539 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [7323 refs] [7323 refs] test_tarfile test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [7327 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading test_threading_local test_threadsignals test_time test_timeout test_tokenize test_trace test_traceback test_transformer test_tuple test_ucn test_unary test_unicode test_unicode_file test_unicode_file skipped -- No Unicode filesystem semantics on this platform. test_unicodedata test_univnewlines test_unpack test_urllib test_urllib2 test_urllib2_localnet test_urllib2net test_urllibnet test_urlparse test_userdict test_userlist test_userstring test_uu test_uuid WARNING: uuid.getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._ifconfig_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._unixdll_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. test_wait3 test_wait4 test_warnings test_wave test_weakref test_whichdb test_winreg test_winreg skipped -- No module named _winreg test_winsound test_winsound skipped -- No module named winsound test_with test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile test_zipfile64 test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run test_zipimport test_zlib 301 tests OK. 1 test failed: test_bsddb3 21 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_gl test_imageop test_imgfile test_ioctl test_macostools test_pep277 test_plistlib test_scriptpackages test_startfile test_sunaudiodev test_tcl test_unicode_file test_winreg test_winsound test_zipfile64 1 skip unexpected on linux2: test_ioctl [494409 refs] From buildbot at python.org Thu Jun 14 23:49:12 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 14 Jun 2007 21:49:12 +0000 Subject: [Python-checkins] buildbot warnings in x86 XP-3 2.5 Message-ID: <20070614214913.271D21E4003@bag.python.org> The Buildbot has detected a new failure of x86 XP-3 2.5. Full details are available at: http://www.python.org/dev/buildbot/all/x86%2520XP-3%25202.5/builds/18 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: Build Source Stamp: [branch branches/release25-maint] HEAD Blamelist: martin.v.loewis Build had warnings: warnings test Excerpt from the test logfile: 1 test failed: test_mmap sincerely, -The Buildbot From python-checkins at python.org Fri Jun 15 02:01:47 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 02:01:47 +0200 (CEST) Subject: [Python-checkins] r55979 - sandbox/trunk/pep0/pep0/__init__.py sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070615000147.222C01E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 02:01:46 2007 New Revision: 55979 Modified: sandbox/trunk/pep0/pep0/__init__.py sandbox/trunk/pep0/pep0/pep.py Log: Minor doc cleanup. Modified: sandbox/trunk/pep0/pep0/__init__.py ============================================================================== --- sandbox/trunk/pep0/pep0/__init__.py (original) +++ sandbox/trunk/pep0/pep0/__init__.py Fri Jun 15 02:01:46 2007 @@ -9,7 +9,7 @@ With the PEP information collected, to create the index itself you must: 1. Output static text. - 2.. Format an entry for the PEP. + 2. Format an entry for the PEP. 3. Output the PEP (both by category and numerical index). """ Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Fri Jun 15 02:01:46 2007 @@ -1,9 +1,4 @@ -"""Code for handling object representation of a PEP. - -XXX - * Flesh out PEP class. - -""" +"""Code for handling object representation of a PEP.""" import re class PEP(object): From python-checkins at python.org Fri Jun 15 04:35:55 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 04:35:55 +0200 (CEST) Subject: [Python-checkins] r55980 - sandbox/trunk/pep0/pep0/__init__.py sandbox/trunk/pep0/pep0/authors.py sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/parse.py sandbox/trunk/pep0/pep0/pep.py sandbox/trunk/pep0/pep0/statictext.py Message-ID: <20070615023555.87F071E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 04:35:52 2007 New Revision: 55980 Added: sandbox/trunk/pep0/pep0/constants.py (contents, props changed) Removed: sandbox/trunk/pep0/pep0/authors.py sandbox/trunk/pep0/pep0/statictext.py Modified: sandbox/trunk/pep0/pep0/__init__.py sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/parse.py sandbox/trunk/pep0/pep0/pep.py Log: Update code to use pep.PEP object representation. Along the way consolidate some functionality in more proper modules. Modified: sandbox/trunk/pep0/pep0/__init__.py ============================================================================== --- sandbox/trunk/pep0/pep0/__init__.py (original) +++ sandbox/trunk/pep0/pep0/__init__.py Fri Jun 15 04:35:52 2007 @@ -17,101 +17,18 @@ if __name__ == '__main__': from pep0.parse import consume_directory, consume_pep - from pep0.pep import sort_peps, PEP - from pep0.output import write_column_headers, write_pep - from pep0.statictext import header, intro, references, footer + from pep0.output import write_pep0 - import os + from os.path import isdir from sys import argv, stdout if not argv[1:]: path = '.' else: path = argv[1] - if os.path.isdir(path): + if isdir(path): peps = consume_directory(path) else: peps = [consume_pep(path)] - print header - print - print "Introduction" - print intro - print - print "Index by Category" - print - write_column_headers(stdout) - meta, info, accepted, open_, done, empty, dead = sort_peps(peps) - print - print " Meta-PEPs (PEPs about PEPs or Processs)" - print - for pep in meta: - write_pep(pep, stdout) - print - print " Other Informational PEPs" - print - for pep in info: - write_pep(pep, stdout) - print - print " Accepted PEPs (accepted; may not be implemented yet)" - print - for pep in accepted: - write_pep(pep, stdout) - print - print " Open PEPs (under consideration)" - print - for pep in open_: - write_pep(pep, stdout) - print - print " Finished PEPs (done, implemented in code repository)" - print - for pep in done: - write_pep(pep, stdout) - print - print " Empty PEPs (or containing only abstract)" - print - for pep in empty: - write_pep(pep, stdout) - print - print " Deferred, Abandoned, Withdrawn, and Rejected PEPs" - print - for pep in dead: - write_pep(pep, stdout) - print - print - print " Numerical Index" - print - write_column_headers(stdout) - prev_pep = 0 - for pep in peps: - if pep['PEP'] - prev_pep > 1: - print - write_pep(pep, stdout) - prev_pep = pep['PEP'] - print - print - print "Key" - print - for type_ in PEP.type_values: - print " %s - %s PEP" % (type_[0], type_) - print - for status in PEP.status_values: - print " %s - %s proposal" % (status[0], status) - - print - print - print "Owners" - print - # XXX - # * get "last, first I." of each name. - # * add nickname. - # * find longest name. - # * column headers. - # * name/email with a two-space separation between longest name and email. - print ' XXX' - print - print - print "References" - print - print references - print footer + write_pep0(peps) Deleted: /sandbox/trunk/pep0/pep0/authors.py ============================================================================== --- /sandbox/trunk/pep0/pep0/authors.py Fri Jun 15 04:35:52 2007 +++ (empty file) @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -email_addresses = { - 'Aahz' : 'aahz at pobox.com', - 'James C. Ahlstrom' : 'jim at interet.com', - 'Jim Althoff' : 'james_althoff at i2.com', - 'Kevin Altis' : 'altis at semi-retired.com', - 'David Ascher' : 'davida at activestate.com', - 'Peter Astrand' : 'astrand at lysator.liu.se', - 'Carl Banks' : 'pythondev at aerojockey.com', - 'Paul Barrett' : 'barrett at stsci.edu', - 'Facundo Batista' : 'facundo at taniquetil.com.ar', - 'Anthony Baxter' : 'anthony at interlink.com.au', - 'Thomas Bellman' : 'bellman+pep-divmod at lysator.liu.se', - 'Steven Bethard' : 'steven.bethard at gmail.com', - 'Georg Brandl' : 'g.brandl at gmx.net', - 'Brett Cannon' : 'brett at python.org', - 'Josiah Carlson' : 'jcarlson at uci.edu', - 'W Isaac Carroll' : 'icarroll at pobox.com', - 'Nick Coghlan' : 'ncoghlan at gmail.com', - 'Dave Cole' : 'djc at object-craft.com.au', - 'Christopher Craig' : 'python-pep at ccraig.org', - 'Laura Creighton' : 'lac at strakt.com', - 'Walter D?rwald' : '', - 'Fred L. Drake, Jr.' : 'fdrake at acm.org', - 'Michael P. Dubner' : 'dubnerm at mindless.com', - 'Paul F. Dubois' : 'paul at pfdubois.com', - 'Phillip J. Eby' : 'pje at telecommunity.com', - 'Micah Elliott' : 'mde at tracos.org', - 'Jeff Epler' : 'jepler at unpythonic.net', - 'David Eppstein' : 'eppstein at ics.uci.edu', - 'Clark C. Evans' : 'cce at clarkevans.com', - 'Greg Ewing' : 'greg at cosc.canterbury.ac.nz', - 'Martijn Faassen' : 'faassen at infrae.com', - 'Ben Finney' : 'ben+python at benfinney.id.au', - 'Fr?d?ric B. Giacometti' : 'fred at arakne.com', - 'Scott Gilbert' : 'xscottg at yahoo.com', - 'David Goodger' : 'goodger at python.org', - 'Grant Griffin' : 'g2 at iowegian.com', - 'Mark Hammond' : 'mhammond at skippinet.com.au', - 'Peter Harris' : 'scav at blueyonder.co.uk', - 'Thomas Heller' : 'theller at python.net', - 'Magnus Lie Hetland' : 'magnus at hetland.org', - 'Raymond D. Hettinger' : 'python at rcn.com', - 'Neil Hodgson' : 'neilh at scintilla.org', - 'Michael Hudson' : 'mwh at python.net', - 'Jeremy Hylton' : 'jeremy at zope.com', - 'Jack Jansen' : 'jack at cwi.nl', - 'Jim Jewett' : 'jimjjewett at users.sourceforge.net', - 'Richard Jones' : 'richard at mechanicalcat.net', - 'Stepan Koltsov' : 'yozh at mx1.ru', - 'A.M. Kuchling' : 'amk at amk.ca', - 'Marc-Andre Lemburg' : 'mal at lemburg.com', - 'Gregory Lielens' : 'gregory.lielens at fft.be', - 'Bj?rn Lindqvist' : 'bjourne at gmail.com', - 'Martin von L?wis' : 'loewis at informatik.hu-berlin.de', - 'Tony Lownds' : 'tony at pagedna.com', - 'Alex Martelli' : 'aleax at aleax.it', - 'Andrew McClelland' : 'eternalsquire at comcast.net', - 'Gordon McMillan' : 'gmcm at hypernet.com', - 'Andrew McNamara' : 'andrewm at object-craft.com.au', - 'Trent Mick' : 'trentm at activestate.com', - 'Mike Meyer' : 'mwm at mired.org', - 'Skip Montanaro' : 'skip at pobox.com', - 'Paul Moore' : 'gustav at morpheus.demon.co.uk', - 'Ben North' : 'ben at redfrontdoor.org', - 'Neal Norwitz' : 'nnorwitz at gmail.com', - 'Travis Oliphant' : 'oliphant at ee.byu.edu', - 'Jason Orendorff' : 'jason.orendorff at gmail.com', - 'Samuele Pedroni' : 'pedronis at python.org', - 'Michel Pelletier' : 'michel at users.sourceforge.net', - 'Tim Peters' : 'tim at zope.com', - 'Jason Petrone' : 'jp at demonseed.net', - 'Paul Prescod' : 'paul at prescod.net', - 'Terry Reedy' : 'tjreedy at udel.edu', - 'Sean Reifschneider' : 'jafo-pep at tummy.com', - 'Christian R. Reis' : 'kiko at async.com.br', - 'Jonathan Riehl' : 'jriehl at spaceship.com', - 'Andr? Roberge' : 'andre.roberge at gmail.com', - 'Guido van Rossum' : 'guido at python.org', - 'Just van Rossum' : 'just at letterror.com', - 'Vinay Sajip' : 'vinay_sajip at red-dove.com', - 'Neil Schemenauer' : 'nas at arctrix.com', - 'Peter Schneider-Kamp' : 'nowonder at nowonder.de', - 'Jiwon Seo' : 'seojiwon at gmail.com', - 'Kevin D. Smith' : 'Kevin.Smith at theMorgue.org', - 'Greg Stein' : 'gstein at lyra.org', - 'Daniel Stutzbach' : 'daniel.stutzbach at gmail.com', - 'Roman Suzi' : 'rnd at onego.ru', - 'Talin' : 'talin at acm.org', - 'Steven Taschuk' : 'staschuk at telusplanet.net', - 'Oren Tirosh' : 'oren at hishome.net', - 'Mike Verdone' : 'mike.verdone at gmail.com', - 'Gregory R. Warnes' : 'warnes at users.sourceforge.net', - 'Barry Warsaw' : 'barry at python.org', - 'Terence Way' : 'terry at wayforward.net', - 'Cliff Wells' : 'LogiplexSoftware at earthlink.net', - 'Greg Wilson' : 'gvwilson at ddj.com', - 'Collin Winter' : 'collinw at gmail.com', - 'Thomas Wouters' : 'thomas at python.org', - 'Ka-Ping Yee' : 'ping at zesty.ca', - 'Moshe Zadka' : 'moshez at zadka.site.co.il', - 'Huaiyu Zhu' : 'hzhu at users.sourceforge.net', -} - -nicknames = { - 'Guido van Rossum' : 'GvR', - 'Just van Rossum' : 'JvR', -} Added: sandbox/trunk/pep0/pep0/constants.py ============================================================================== --- (empty file) +++ sandbox/trunk/pep0/pep0/constants.py Fri Jun 15 04:35:52 2007 @@ -0,0 +1,149 @@ +# -*- coding: utf-8 -*- +column_format = ' %(status)1s%(type)1s %(number)4s %(title)-44s %(authors)-s' + +header = """PEP: 0 +Title: Index of Python Enhancement Proposals (PEPs) +Version: $Revision$ +Last-Modified: $Date$ +Author: David Goodger , + Barry A. Warsaw +Status: Active +Type: Informational +Created: 13-Jul-2000 +""" + +intro = """ + The PEP contains the index of all Python Enhancement Proposals, + known as PEPs. PEP numbers are assigned by the PEP Editor, and + once assigned are never changed. The SVN history[1] of the PEP + texts represent their historical record. + + The BDFL maintains his own Pronouncements page[2] at + http://www.python.org/doc/essays/pepparade.html which contains his + musings on the various outstanding PEPs. +""" + +references = """ + [1] View PEP history online + http://svn.python.org/projects/peps/trunk/ + + [2] The Benevolent Dictator For Life's Parade of PEPs + http://www.python.org/doc/essays/pepparade.html +""" + +footer = """ +Local Variables: +mode: indented-text +indent-tabs-mode: nil +sentence-end-double-space: t +fill-column: 70 +coding: utf-8 +End:""" + +nicknames = { + 'Guido van Rossum' : 'GvR', + 'Just van Rossum' : 'JvR', +} + +email_addresses = { + 'Aahz' : 'aahz at pobox.com', + 'James C. Ahlstrom' : 'jim at interet.com', + 'Jim Althoff' : 'james_althoff at i2.com', + 'Kevin Altis' : 'altis at semi-retired.com', + 'David Ascher' : 'davida at activestate.com', + 'Peter Astrand' : 'astrand at lysator.liu.se', + 'Carl Banks' : 'pythondev at aerojockey.com', + 'Paul Barrett' : 'barrett at stsci.edu', + 'Facundo Batista' : 'facundo at taniquetil.com.ar', + 'Anthony Baxter' : 'anthony at interlink.com.au', + 'Thomas Bellman' : 'bellman+pep-divmod at lysator.liu.se', + 'Steven Bethard' : 'steven.bethard at gmail.com', + 'Georg Brandl' : 'g.brandl at gmx.net', + 'Brett Cannon' : 'brett at python.org', + 'Josiah Carlson' : 'jcarlson at uci.edu', + 'W Isaac Carroll' : 'icarroll at pobox.com', + 'Nick Coghlan' : 'ncoghlan at gmail.com', + 'Dave Cole' : 'djc at object-craft.com.au', + 'Christopher Craig' : 'python-pep at ccraig.org', + 'Laura Creighton' : 'lac at strakt.com', + 'Walter D?rwald' : '', + 'Fred L. Drake, Jr.' : 'fdrake at acm.org', + 'Michael P. Dubner' : 'dubnerm at mindless.com', + 'Paul F. Dubois' : 'paul at pfdubois.com', + 'Phillip J. Eby' : 'pje at telecommunity.com', + 'Micah Elliott' : 'mde at tracos.org', + 'Jeff Epler' : 'jepler at unpythonic.net', + 'David Eppstein' : 'eppstein at ics.uci.edu', + 'Clark C. Evans' : 'cce at clarkevans.com', + 'Greg Ewing' : 'greg at cosc.canterbury.ac.nz', + 'Martijn Faassen' : 'faassen at infrae.com', + 'Ben Finney' : 'ben+python at benfinney.id.au', + 'Fr?d?ric B. Giacometti' : 'fred at arakne.com', + 'Scott Gilbert' : 'xscottg at yahoo.com', + 'David Goodger' : 'goodger at python.org', + 'Grant Griffin' : 'g2 at iowegian.com', + 'Mark Hammond' : 'mhammond at skippinet.com.au', + 'Peter Harris' : 'scav at blueyonder.co.uk', + 'Thomas Heller' : 'theller at python.net', + 'Magnus Lie Hetland' : 'magnus at hetland.org', + 'Raymond D. Hettinger' : 'python at rcn.com', + 'Neil Hodgson' : 'neilh at scintilla.org', + 'Michael Hudson' : 'mwh at python.net', + 'Jeremy Hylton' : 'jeremy at zope.com', + 'Jack Jansen' : 'jack at cwi.nl', + 'Jim Jewett' : 'jimjjewett at users.sourceforge.net', + 'Richard Jones' : 'richard at mechanicalcat.net', + 'Stepan Koltsov' : 'yozh at mx1.ru', + 'A.M. Kuchling' : 'amk at amk.ca', + 'Marc-Andre Lemburg' : 'mal at lemburg.com', + 'Gregory Lielens' : 'gregory.lielens at fft.be', + 'Bj?rn Lindqvist' : 'bjourne at gmail.com', + 'Martin von L?wis' : 'loewis at informatik.hu-berlin.de', + 'Tony Lownds' : 'tony at pagedna.com', + 'Alex Martelli' : 'aleax at aleax.it', + 'Andrew McClelland' : 'eternalsquire at comcast.net', + 'Gordon McMillan' : 'gmcm at hypernet.com', + 'Andrew McNamara' : 'andrewm at object-craft.com.au', + 'Trent Mick' : 'trentm at activestate.com', + 'Mike Meyer' : 'mwm at mired.org', + 'Skip Montanaro' : 'skip at pobox.com', + 'Paul Moore' : 'gustav at morpheus.demon.co.uk', + 'Ben North' : 'ben at redfrontdoor.org', + 'Neal Norwitz' : 'nnorwitz at gmail.com', + 'Travis Oliphant' : 'oliphant at ee.byu.edu', + 'Jason Orendorff' : 'jason.orendorff at gmail.com', + 'Samuele Pedroni' : 'pedronis at python.org', + 'Michel Pelletier' : 'michel at users.sourceforge.net', + 'Tim Peters' : 'tim at zope.com', + 'Jason Petrone' : 'jp at demonseed.net', + 'Paul Prescod' : 'paul at prescod.net', + 'Terry Reedy' : 'tjreedy at udel.edu', + 'Sean Reifschneider' : 'jafo-pep at tummy.com', + 'Christian R. Reis' : 'kiko at async.com.br', + 'Jonathan Riehl' : 'jriehl at spaceship.com', + 'Andr? Roberge' : 'andre.roberge at gmail.com', + 'Guido van Rossum' : 'guido at python.org', + 'Just van Rossum' : 'just at letterror.com', + 'Vinay Sajip' : 'vinay_sajip at red-dove.com', + 'Neil Schemenauer' : 'nas at arctrix.com', + 'Peter Schneider-Kamp' : 'nowonder at nowonder.de', + 'Jiwon Seo' : 'seojiwon at gmail.com', + 'Kevin D. Smith' : 'Kevin.Smith at theMorgue.org', + 'Greg Stein' : 'gstein at lyra.org', + 'Daniel Stutzbach' : 'daniel.stutzbach at gmail.com', + 'Roman Suzi' : 'rnd at onego.ru', + 'Talin' : 'talin at acm.org', + 'Steven Taschuk' : 'staschuk at telusplanet.net', + 'Oren Tirosh' : 'oren at hishome.net', + 'Mike Verdone' : 'mike.verdone at gmail.com', + 'Gregory R. Warnes' : 'warnes at users.sourceforge.net', + 'Barry Warsaw' : 'barry at python.org', + 'Terence Way' : 'terry at wayforward.net', + 'Cliff Wells' : 'LogiplexSoftware at earthlink.net', + 'Greg Wilson' : 'gvwilson at ddj.com', + 'Collin Winter' : 'collinw at gmail.com', + 'Thomas Wouters' : 'thomas at python.org', + 'Ka-Ping Yee' : 'ping at zesty.ca', + 'Moshe Zadka' : 'moshez at zadka.site.co.il', + 'Huaiyu Zhu' : 'hzhu at users.sourceforge.net', +} Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Fri Jun 15 04:35:52 2007 @@ -1,66 +1,107 @@ """Code to handle the output of PEP 0. XXX - * Move output code from __init__ to here. * Move PEP sorting to here. - * Move last name code to here? - """ -from . import authors -from .pep import last_name +from . import constants +from .pep import sort_peps, PEP + +from sys import stdout -indent = ' ' -def make_entry(type_, status, number, title, owners): - """Return the string representation for a PEP entry (or anything that is - similarly formatted. - - If type_ or status have values of None they are filled in with whitespace. - All arguments are expected to be valid. - - """ - entry = [indent] - # Type. - if type_: - entry.append(type_[0].upper()) - else: - entry.append(' ') - # Status. - if status and status not in ('Active', 'Draft'): - entry.append(type_[0].upper()) - else: - entry.append(' ') - # Number. - entry.append(str(number).ljust(4)) - # Title. - entry.append(title.rjust(44)) - # owners. - entry.append(', '.join(last_name(owner) for owner in owners)) - - # Indent, Type, Statue, Number, Title, Owners. - return "%s%s%s %s %s %s" % entry - -def write_pep(pep, output): - """Write PEP info to 'output'.""" - type_abbr = pep['Type'][0].upper() - status = pep['Status'] - if status in ('Draft', 'Active'): - status_abbr = ' ' - else: - status_abbr = status[0].upper() - number = str(pep['PEP']).rjust(4) - title = pep['Title'] - authors_list = [] - author_string = ', '.join(last_name(author, authors.nicknames) - for author in pep['Author']) - output.write(" %s%s %s %s %s\n" % - (type_abbr, status_abbr, number, title.ljust(44), - author_string)) +indent = ' ' def write_column_headers(output): """Output the column headers for the PEP indices.""" - output.write('%s %s %s\n' % ("num".rjust(8), "title".ljust(44), "owner")) - output.write('%s %s %s\n' % ((len("num")*'-').rjust(8), - (len("title")*'-').ljust(44), len("owner")*'-')) - - + column_headers = {'status': '', 'type': '', 'number': 'num', + 'title': 'title', 'authors': 'owner'} + print>>output, constants.column_format % column_headers + underline_headers = {} + for key, value in column_headers.items(): + underline_headers[key] = len(value) * '-' + print>>output, constants.column_format % underline_headers + + +def write_pep0(peps, output=stdout): + print>>output, constants.header + print>>output + print>>output, "Introduction" + print>>output, constants.intro + print>>output + print>>output, "Index by Category" + print>>output + write_column_headers(output) + meta, info, accepted, open_, done, empty, dead = sort_peps(peps) + print>>output + print>>output, " Meta-PEPs (PEPs about PEPs or Processs)" + print>>output + for pep in meta: + print>>output, pep + print>>output + print>>output, " Other Informational PEPs" + print>>output + for pep in info: + print>>output, pep + print>>output + print>>output, " Accepted PEPs (accepted; may not be implemented yet)" + print>>output + for pep in accepted: + print>>output, pep + print>>output + print>>output, " Open PEPs (under consideration)" + print>>output + for pep in open_: + print>>output, pep + print>>output + print>>output, " Finished PEPs (done, implemented in code repository)" + print>>output + for pep in done: + print>>output, pep + print>>output + print>>output, " Empty PEPs (or containing only abstract)" + print>>output + for pep in empty: + print>>output, pep + print>>output + print>>output, " Deferred, Abandoned, Withdrawn, and Rejected PEPs" + print>>output + for pep in dead: + print>>output, pep + print>>output + print>>output + print>>output, " Numerical Index" + print>>output + write_column_headers(output) + prev_pep = 0 + for pep in peps: + if pep.number - prev_pep > 1: + print>>output + print>>output, pep + prev_pep = pep.number + print>>output + print>>output + print>>output, "Key" + print>>output + for type_ in PEP.type_values: + print>>output, " %s - %s PEP" % (type_[0], type_) + print>>output + for status in PEP.status_values: + print>>output, " %s - %s proposal" % (status[0], status) + + print>>output + print>>output + print>>output, "Owners" + print>>output + # XXX + # * get "last, first I." of each name. + # * add nickname. + # * find longest name. + # * column headers. + # * name/email with a two-space separation between longest name and email. + print>>output, ' XXX' + print>>output + print>>output + print>>output, "References" + print>>output + print>>output, constants.references + print>>output, constants.footer Modified: sandbox/trunk/pep0/pep0/parse.py ============================================================================== --- sandbox/trunk/pep0/pep0/parse.py (original) +++ sandbox/trunk/pep0/pep0/parse.py Fri Jun 15 04:35:52 2007 @@ -12,6 +12,7 @@ from __future__ import with_statement from .pep import PEP +from operator import attrgetter import os def consume_directory(directory): @@ -26,7 +27,7 @@ for file_name in os.listdir(directory): if file_name.startswith('pep-') and file_name.endswith('.txt'): peps.append(consume_pep(os.path.join(directory, file_name))) - peps.sort(key=lambda pep: pep['PEP']) + peps.sort(key=attrgetter('number')) return peps def consume_pep(path): @@ -50,7 +51,6 @@ data = metadata[field] + data metadata[field] = data except Exception: - print "*** In", pep_file raise # Make sure PEP field was found ... if not 'PEP' in metadata: @@ -64,7 +64,7 @@ metadata['PEP'] = int(metadata['PEP']) except ValueError: raise ValueError("PEP number in file %s is not valid" % path) - return metadata + return PEP(metadata) def split_metadata(line, continue_field=None): """Parse the given line for PEP metadata, returning the field and data for Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Fri Jun 15 04:35:52 2007 @@ -1,9 +1,31 @@ """Code for handling object representation of a PEP.""" +from .constants import nicknames, column_format + import re + class PEP(object): - """Representation of PEPs.""" + """Representation of PEPs. + + Attributes: + + + number : int + PEP number. + + + title : str + PEP title. + + + type_ : str + The type of PEP. Can only be one of the values from + PEP.type_values. + + + status : str + The PEP's status. Value must be found in PEP.status_values. + + + authors : Sequence(str) + A list of the authors' full names. + """ type_values = ("Standards Track", "Informational", "Process") # Active and Draft are not listed in the index. @@ -13,10 +35,13 @@ def __init__(self, metadata_dict): """Init object based on dict containing metadata from a file. - Required keys are: + Required keys from metadata_dict are: * PEP - value must be an integer. + Value must be an integer. + + * Title + A string. * Type Value must match a value in self.type_values. @@ -30,12 +55,14 @@ """ # Verify keys exist. - for required_key in ('PEP', 'Type', 'Status', 'Author'): + for required_key in ('PEP', 'Title', 'Type', 'Status', 'Author'): if required_key not in metadata_dict: raise KeyError("required key %r not in dict") # 'PEP'. PEP parsing should have already converted the number to an # integer, so just being safe here. self.number = int(metadata_dict['PEP']) + # 'Title'. + self.title = metadata_dict['Title'] # 'Type'. type_ = metadata_dict['Type'] if type_ not in self.type_values: @@ -83,8 +110,17 @@ def __str__(self): """Return the line entry for the PEP.""" - return '' - pass + pep_info = {'type': self.type_[0].upper(), 'number': str(self.number), + 'title': self.title} + if self.status in ('Draft', 'Active'): + status_abbr = ' ' + else: + status_abbr = self.status[0].upper() + pep_info['status'] = status_abbr + author_string = ', '.join(last_name(author, nicknames) + for author in self.authors) + pep_info['authors'] = author_string + return column_format % pep_info def last_name(full_name, nicknames={}): @@ -124,18 +160,18 @@ for pep in peps: # Order of 'if' statement important. Key Status values take precedence # over Type value, and vice-versa. - if pep['Status'] == 'Draft': + if pep.status == 'Draft': open_.append(pep) - elif pep['Status'] in ('Rejected', 'Withdrawn', 'Deferred', + elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', 'Incomplete'): dead.append(pep) - elif pep['Type'] == 'Process': + elif pep.status == 'Process': meta.append(pep) - elif pep['Type'] == 'Informational': + elif pep.status == 'Informational': info.append(pep) - elif pep['Status'] == 'Accepted': + elif pep.status == 'Accepted': accepted.append(pep) - elif pep['Status'] == 'Final': + elif pep.status == 'Final': finished.append(pep) return meta, info, accepted, open_, finished, empty, dead Deleted: /sandbox/trunk/pep0/pep0/statictext.py ============================================================================== --- /sandbox/trunk/pep0/pep0/statictext.py Fri Jun 15 04:35:52 2007 +++ (empty file) @@ -1,40 +0,0 @@ -# Don't start on a new line to make easier to read as that would cause output to -# start on a blank line. -header = """PEP: 0 -Title: Index of Python Enhancement Proposals (PEPs) -Version: $Revision$ -Last-Modified: $Date$ -Author: David Goodger , - Barry A. Warsaw -Status: Active -Type: Informational -Created: 13-Jul-2000 -""" - -intro = """ - The PEP contains the index of all Python Enhancement Proposals, - known as PEPs. PEP numbers are assigned by the PEP Editor, and - once assigned are never changed. The SVN history[1] of the PEP - texts represent their historical record. - - The BDFL maintains his own Pronouncements page[2] at - http://www.python.org/doc/essays/pepparade.html which contains his - musings on the various outstanding PEPs. -""" - -references = """ - [1] View PEP history online - http://svn.python.org/projects/peps/trunk/ - - [2] The Benevolent Dictator For Life's Parade of PEPs - http://www.python.org/doc/essays/pepparade.html -""" - -footer = """ -Local Variables: -mode: indented-text -indent-tabs-mode: nil -sentence-end-double-space: t -fill-column: 70 -coding: utf-8 -End:""" From python-checkins at python.org Fri Jun 15 04:37:39 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 04:37:39 +0200 (CEST) Subject: [Python-checkins] r55981 - sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070615023739.427B71E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 04:37:37 2007 New Revision: 55981 Modified: sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Log: Move sort_peps to the 'output' module as it is the only user of the function. Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Fri Jun 15 04:37:37 2007 @@ -1,10 +1,6 @@ -"""Code to handle the output of PEP 0. - -XXX - * Move PEP sorting to here. -""" +"""Code to handle the output of PEP 0.""" from . import constants -from .pep import sort_peps, PEP +from .pep import PEP from sys import stdout @@ -22,6 +18,35 @@ print>>output, constants.column_format % underline_headers +def sort_peps(peps): + """Sort PEPs into meta, informational, accepted, open, finished, empty, + and essentially dead.""" + meta = [] + info = [] + accepted = [] + open_ = [] + finished = [] + empty = [] + dead = [] + for pep in peps: + # Order of 'if' statement important. Key Status values take precedence + # over Type value, and vice-versa. + if pep.status == 'Draft': + open_.append(pep) + elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', + 'Incomplete'): + dead.append(pep) + elif pep.status == 'Process': + meta.append(pep) + elif pep.status == 'Informational': + info.append(pep) + elif pep.status == 'Accepted': + accepted.append(pep) + elif pep.status == 'Final': + finished.append(pep) + return meta, info, accepted, open_, finished, empty, dead + + def write_pep0(peps, output=stdout): print>>output, constants.header print>>output Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Fri Jun 15 04:37:37 2007 @@ -146,34 +146,3 @@ return ' '.join(name_parts[-2:]) else: return name_parts[-1] - -def sort_peps(peps): - """Sort PEPs into meta, informational, accepted, open, finished, empty, - and essentially dead.""" - meta = [] - info = [] - accepted = [] - open_ = [] - finished = [] - empty = [] - dead = [] - for pep in peps: - # Order of 'if' statement important. Key Status values take precedence - # over Type value, and vice-versa. - if pep.status == 'Draft': - open_.append(pep) - elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', - 'Incomplete'): - dead.append(pep) - elif pep.status == 'Process': - meta.append(pep) - elif pep.status == 'Informational': - info.append(pep) - elif pep.status == 'Accepted': - accepted.append(pep) - elif pep.status == 'Final': - finished.append(pep) - return meta, info, accepted, open_, finished, empty, dead - - - From python-checkins at python.org Fri Jun 15 04:48:48 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 04:48:48 +0200 (CEST) Subject: [Python-checkins] r55982 - sandbox/trunk/pep0/NOTES sandbox/trunk/pep0/TODO Message-ID: <20070615024848.3A8841E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 04:48:43 2007 New Revision: 55982 Added: sandbox/trunk/pep0/NOTES - copied, changed from r54858, sandbox/trunk/pep0/TODO Removed: sandbox/trunk/pep0/TODO Log: Rename TODO to NOTES and update. Copied: sandbox/trunk/pep0/NOTES (from r54858, sandbox/trunk/pep0/TODO) ============================================================================== --- sandbox/trunk/pep0/TODO (original) +++ sandbox/trunk/pep0/NOTES Fri Jun 15 04:48:43 2007 @@ -1,10 +1,3 @@ -* Update test_pep0: - + authors - + output - + pep - + statictext - - Functionality to add -------------------- @@ -17,7 +10,7 @@ - Underline to length of author name or just column header like in rest of doc? -* Make sure that it is easy to identify which PEP triggered an error. +* Verify PEP is well-formatted. + Values in fields correct. - All authors declared in authors.py. + Formatting correct. @@ -37,7 +30,8 @@ up-to-date address in a single location. + Type field - - Meta-PEPs are not delineated as such. + - Meta-PEPs are not delineated as such (e.g., usually specified as + Informative). + Status field. - Empty PEPs are not specified as such. Deleted: /sandbox/trunk/pep0/TODO ============================================================================== --- /sandbox/trunk/pep0/TODO Fri Jun 15 04:48:43 2007 +++ (empty file) @@ -1,64 +0,0 @@ -* Update test_pep0: - + authors - + output - + pep - + statictext - - -Functionality to add --------------------- - -* Read PEPs as UTF-8. - -* Author/email list. - + names - + emails - + Column headers. - - Underline to length of author name or just column header like in - rest of doc? - -* Make sure that it is easy to identify which PEP triggered an error. - + Values in fields correct. - - All authors declared in authors.py. - + Formatting correct. - - Plaintext. - - reST. - - -Inconsistencies/Things To Improve ---------------------------------- -* Within PEPs: - - + Author field - - Three different formats for author (two include an email address). - - Best to settle on a single format. - * Author names separated by commas. - * Maintain email addresses only in PEP index so as to always have - up-to-date address in a single location. - - + Type field - - Meta-PEPs are not delineated as such. - - + Status field. - - Empty PEPs are not specified as such. - -* In the index: - - * Counting gap in numerical index and a newline. - + 42/100, 160/200. - + No other spaces in the count are used (e.g., 666/754). - + Have no spaces, always have a space? - + Should jumps in thousands digit have more than a single newline? - - * Titles that are longer than allowed. - + 311, 3001. - + Use custom titles to fit. - + Possible solutions. - - Use ellipsis to shorten name for index? - - Just deal with some being longer than expected? - - * Type/Status field. - + Active and Draft status is not listed in index. - - Conflicts with Accepted and Deferred initials, respectively. - - Worth using other letters? - From python-checkins at python.org Fri Jun 15 04:49:20 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 04:49:20 +0200 (CEST) Subject: [Python-checkins] r55983 - sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/output.py Message-ID: <20070615024920.45C531E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 04:49:18 2007 New Revision: 55983 Modified: sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/output.py Log: Fix the output of type and status of a PEP. Modified: sandbox/trunk/pep0/pep0/constants.py ============================================================================== --- sandbox/trunk/pep0/pep0/constants.py (original) +++ sandbox/trunk/pep0/pep0/constants.py Fri Jun 15 04:49:18 2007 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -column_format = ' %(status)1s%(type)1s %(number)4s %(title)-44s %(authors)-s' +column_format = ' %(type)1s%(status)1s %(number)4s %(title)-44s %(authors)-s' header = """PEP: 0 Title: Index of Python Enhancement Proposals (PEPs) Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Fri Jun 15 04:49:18 2007 @@ -36,9 +36,9 @@ elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', 'Incomplete'): dead.append(pep) - elif pep.status == 'Process': + elif pep.type_ == 'Process': meta.append(pep) - elif pep.status == 'Informational': + elif pep.type_ == 'Informational': info.append(pep) elif pep.status == 'Accepted': accepted.append(pep) @@ -56,7 +56,7 @@ print>>output, "Index by Category" print>>output write_column_headers(output) - meta, info, accepted, open_, done, empty, dead = sort_peps(peps) + meta, info, accepted, open_, finished, empty, dead = sort_peps(peps) print>>output print>>output, " Meta-PEPs (PEPs about PEPs or Processs)" print>>output @@ -80,7 +80,7 @@ print>>output print>>output, " Finished PEPs (done, implemented in code repository)" print>>output - for pep in done: + for pep in finished: print>>output, pep print>>output print>>output, " Empty PEPs (or containing only abstract)" From python-checkins at python.org Fri Jun 15 05:11:42 2007 From: python-checkins at python.org (neal.norwitz) Date: Fri, 15 Jun 2007 05:11:42 +0200 (CEST) Subject: [Python-checkins] r55984 - python/trunk/Misc/build.sh Message-ID: <20070615031142.C657C1E4004@bag.python.org> Author: neal.norwitz Date: Fri Jun 15 05:11:41 2007 New Revision: 55984 Modified: python/trunk/Misc/build.sh Log: urllib2_localnet says it leaks probably due to threads. So ignore it. popen2 is also complaining probably for similar reasons. make install always reports failure, so don't mail in this case. Modified: python/trunk/Misc/build.sh ============================================================================== --- python/trunk/Misc/build.sh (original) +++ python/trunk/Misc/build.sh Fri Jun 15 05:11:41 2007 @@ -67,7 +67,7 @@ # Note: test_XXX (none currently) really leak, but are disabled # so we don't send spam. Any test which really leaks should only # be listed here if there are also test cases under Lib/test/leakers. -LEAKY_TESTS="test_(cmd_line|socket)" +LEAKY_TESTS="test_(cmd_line|popen2|socket|urllib2_localnet)" # Skip these tests altogether when looking for leaks. These tests # do not need to be stored above in LEAKY_TESTS too. @@ -166,7 +166,6 @@ start=`current_time` make install >& build/$F update_status "Installing" "$F" $start - mail_on_failure "install" build/$F if [ ! -x $PYTHON ]; then ln -s ${PYTHON}2.* $PYTHON From python-checkins at python.org Fri Jun 15 05:42:52 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 05:42:52 +0200 (CEST) Subject: [Python-checkins] r55988 - sandbox/trunk/pep0/test_pep0.py Message-ID: <20070615034252.8DED41E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 05:42:49 2007 New Revision: 55988 Removed: sandbox/trunk/pep0/test_pep0.py Log: Ditch test file. Just easier to run on actual PEPs. Deleted: /sandbox/trunk/pep0/test_pep0.py ============================================================================== --- /sandbox/trunk/pep0/test_pep0.py Fri Jun 15 05:42:49 2007 +++ (empty file) @@ -1,313 +0,0 @@ -from __future__ import with_statement -import pep0.parse - -import itertools -import unittest -from test import test_support -from contextlib import contextmanager -import os - -class ParseTests(unittest.TestCase): - - """Test pep0.parse .""" - - def create_path(self): - return test_support.TESTFN + str(self.num) - - def setUp(self): - self.num = 42 - self.path = self.create_path() - - def tearDown(self): - if os.path.exists(self.path): - os.unlink(self.path) - - def create_simple_pep(self, num=None): - if num is None: - num = self.num - with open(self.path, 'w') as pep_file: - pep_file.write("PEP: %s\n\nBody" % num) - - def test_split_metadata_single_line(self): - # Test basic use case. - gave_field = "field" - gave_data = "data" - # Spaces in separator help test whitespace stripping. - for sep in (':', ' :', ': '): - line = sep.join([gave_field, gave_data]) - got_field, got_data = pep0.parse.split_metadata(line) - self.failUnlessEqual(gave_field, got_field) - self.failUnlessEqual(gave_data, got_data) - bad_line = 'abc' - self.failUnlessRaises(ValueError, pep0.parse.split_metadata, bad_line) - - def test_split_metadata_continuing_line(self): - # Make sure that if the line is considered a continuation of another - # one that the same field is returned. - gave_field ='a' - gave_data = 'b:c' - got_field, got_data = pep0.parse.split_metadata(gave_data, gave_field) - self.failUnlessEqual(got_field, gave_field) - self.failUnlessEqual(got_data, gave_data) - - def test_consume_pep_number_field(self): - # All PEPs must have a PEP field. - self.create_simple_pep() - metadata = pep0.parse.consume_pep(self.path) - self.failUnless('PEP' in metadata) - self.failUnlessEqual(metadata['PEP'], self.num) - - def test_consume_pep_file_name(self): - # The PEP number is expected to be in file name. - # Testing positive results implicit in other tests of pep0.consume_pep. - self.path = test_support.TESTFN - assert str(self.num) not in self.path - self.create_simple_pep() - self.failUnlessRaises(ValueError, pep0.parse.consume_pep, self.path) - - def test_consume_pep_valid_int(self): - # The found value of the 'PEP' field is expected to be a valid number. - self.create_simple_pep("XXX") - self.failUnlessRaises(ValueError, pep0.parse.consume_pep, self.path) - - def test_consume_pep_multiline_data(self): - # If data spans multiple lines it should come out as a single one after - # parsing. - line1 = "a, b, c," - line2 = "d, e, f" - with open(self.path, 'w') as pep_file: - pep_file.write("PEP: %s\n" % self.num) - pep_file.write("multiline: a, b, c,\n") - pep_file.write(" d, e, f\n") - pep_file.write("\nBody") - metadata = pep0.parse.consume_pep(self.path) - self.failUnlessEqual(metadata['multiline'], line1 + line2) - - -class HandlerTests(unittest.TestCase): - - """Test the PEP field handlers for parsing data.""" - - def test_handle_generic(self): - # Identity function. - for data in ('spam', 'spam,', '', 'spam, monty'): - self.failUnlessEqual(pep0.handle_generic(data), data) - - def test_pep_num(self): - # String -> int. - num = 42 - string_rep = str(num) - self.failUnlessEqual(pep0.handle_pep_num(string_rep), num) - - def test_handle_csv(self): - # Split on commas. - data = ['a', 'b', 'c'] - string_rep = ','.join(data) - self.failUnlessEqual(pep0.handle_csv(string_rep), data) - string_rep = ', '.join(data) - self.failUnlessEqual(pep0.handle_csv(string_rep), data) - string_rep = ', '.join(data) + ',' - got = pep0.handle_csv(string_rep) - self.failUnlessEqual(got, data, - '%r != %r (using %r)' % - (got, data, string_rep)) - - def test_handle_author(self): - # Handle the various ways authors can be specified. - # Test needs to validate not just how the author's name can be written - # but also variations in people's names (e.g., 'van', 'Jr.', etc.). - authors = ["Guido van Rossum", "Brett Cannon", "Fred L. Drake, Jr.", - "Aahz"] - formats = ["%s ", "email (%s)", "%s"] - for format in formats: - for author_count in range(len(authors)): - rep = ', '.join(format % author - for author in authors[:author_count+1]) - expect = authors[:author_count+1] - got = pep0.handle_author(rep) - self.failUnlessEqual(got, expect) - # Test with a trailing comma. - rep += ',' - got = pep0.handle_author(rep) - self.failUnlessEqual(got, expect) - - -class PEPClassTests(unittest.TestCase): - - """Test the PEP class.""" - - def setUp(self): - self.metadata = {'PEP': 42, 'Type': pep0.pep.PEP.type_values[0], - 'Status': pep0.pep.PEP.status_values[0], - 'Author': "Brett Cannon"} - - def test_init_number(self): - # PEP number must be an int. - pep = pep0.pep.PEP(self.metadata) - self.failUnlessEqual(pep.number, self.metadata['PEP']) - self.metadata['PEP'] = 'XXX' - self.failUnlessRaises(ValueError, pep0.pep.PEP, self.metadata) - - def test_init_status(self): - # Invalid Status entry raises an exception. - pass - - def test_init_type(self): - # Invalid type should raise an exception. - pass - - def test_init_authors(self): - # There should be at least one author. - pass - - - at contextmanager -def test_file(path): - try: - open_file = open(path, 'w') - yield open_file - finally: - open_file.close() - if os.path.exists(path): - os.unlink(path) - - -class ConsumePepTests(unittest.TestCase): - - """Test the reading and parsing of a PEP file.""" - - def test_single_line(self): - # Test a PEP that only has a single line of metadata. - type_ = 'Spam' - data = 'Monty' - with test_file(test_support.TESTFN) as pep_file: - pep_file.write('%s: %s\n' % (type_, data)) - pep_file.write('\n') - pep_file.write('The PEP.') - pep_file.close() - metadata = pep0.consume_pep(test_support.TESTFN) - self.failUnless(type_ in metadata) - self.failUnlessEqual(metadata[type_], data) - - def test_multi_line_authors(self): - # Make sure that metadata that takes multiple lines works when it - # is expected (e.g., Author and Post-History). - authors = ['A', 'B'] - output = 'Author: ' + authors[0] + '\n' - output += ' ' + authors[1] + '\n' - with test_file(test_support.TESTFN) as pep_file: - pep_file.write(output) - pep_file.write('\n') - pep_file.write('The PEP.') - pep_file.close() - metadata = pep0.consume_pep(test_support.TESTFN) - self.failUnless('Author' in metadata) - self.failUnlessEqual(metadata['Author'], authors) - - def test_multi_line_post_history(self): - # Post-History entries on multiple lines is fine. - dates = ['04-Jul-1776', '23-Oct-2007', '01-Jan-2001'] - output = 'Post-History: ' + ', '.join(dates[:2]) + '\n' - output += ' ' + dates[2] + '\n' - with test_file(test_support.TESTFN) as pep_file: - pep_file.write(output) - pep_file.write('\n') - pep_file.write('The PEP.') - pep_file.close() - metadata = pep0.consume_pep(test_support.TESTFN) - self.failUnless('Post-History' in metadata) - self.failUnlessEqual(metadata['Post-History'], dates) - - def test_missing_fields(self): - # Missing key fields should raise ValueError. - # PEP - # Author - # Type - # Status - pass - - def test_pep_field(self): - # PEP field should only contain a number. - pass - - def test_author_field(self): - # Author field should have at least a single author. - pass - - def test_type_field(self): - # Type field should contain only a valid value. - pass - - def test_status_field(self): - # Status field should contain only a valid value. - pass - - -class EntryOutputTests(unittest.TestCase): - - """Tests for single-line output into the index.""" - - def test_make_entry_type(self): - # Test handling of type_ argument. - pass - - def test_make_entry_status(self): - # make_entry's status argument. - pass - - def test_make_entry_number(self): - # make_entry's number argument. - pass - - def test_make_entry_number(self): - # make_entry's title argument. - pass - - def test_make_entry_title(self): - # make_entry's title argument. - pass - - def test_make_entry_owners(self): - # make_entry's owners argument. - pass - - def test_make_entry_column_headers(self): - # Should be able to output column headers properly. - pass - - def test_make_entry_underline(self): - # Underlining of column headers should be okay. - pass - - def test_author_last_name(self): - # Test that last names are discovered properly. - test_names = [("Brett Cannon", "Cannon"), - ("Guido van Rossum", "van Rossum"), - ("Fred L. Drake, Jr.", "Drake"), - ("Aahz", "Aahz"), - ] - for full_name, expect in test_names: - got = pep0.last_name(full_name) - self.failUnlessEqual(got, expect) - - def test_author_nickname(self): - # Make sure nicknames are returned instead of last names when a - # nickname is available. - full_name = 'Guido van Rossum' - nickname = 'GvR' - last_name = 'van Rossum' - got = pep0.last_name(full_name, {full_name:nickname}) - self.failUnlessEqual(got, nickname) - got = pep0.last_name(full_name, {'asdf':nickname}) - self.failUnlessEqual(got, last_name) - - -def test_main(): - test_support.run_unittest( - ParseTests, - PEPClassTests, - ) - - -if __name__ == '__main__': - test_main() From python-checkins at python.org Fri Jun 15 05:46:25 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 05:46:25 +0200 (CEST) Subject: [Python-checkins] r55989 - sandbox/trunk/pep0/pep0/constants.py Message-ID: <20070615034625.6A6F21E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 05:46:18 2007 New Revision: 55989 Modified: sandbox/trunk/pep0/pep0/constants.py Log: Move author/email list over to a tuple instead of a dict. Either have it in a dict so that verifying that a PEP's listed author is legit is fast, but then pay the price when outputting the author list (make a sequence and sort the thing), or make it a sequence and pay the price in verifyin the author's name. Modified: sandbox/trunk/pep0/pep0/constants.py ============================================================================== --- sandbox/trunk/pep0/pep0/constants.py (original) +++ sandbox/trunk/pep0/pep0/constants.py Fri Jun 15 05:46:18 2007 @@ -45,105 +45,106 @@ 'Just van Rossum' : 'JvR', } -email_addresses = { - 'Aahz' : 'aahz at pobox.com', - 'James C. Ahlstrom' : 'jim at interet.com', - 'Jim Althoff' : 'james_althoff at i2.com', - 'Kevin Altis' : 'altis at semi-retired.com', - 'David Ascher' : 'davida at activestate.com', - 'Peter Astrand' : 'astrand at lysator.liu.se', - 'Carl Banks' : 'pythondev at aerojockey.com', - 'Paul Barrett' : 'barrett at stsci.edu', - 'Facundo Batista' : 'facundo at taniquetil.com.ar', - 'Anthony Baxter' : 'anthony at interlink.com.au', - 'Thomas Bellman' : 'bellman+pep-divmod at lysator.liu.se', - 'Steven Bethard' : 'steven.bethard at gmail.com', - 'Georg Brandl' : 'g.brandl at gmx.net', - 'Brett Cannon' : 'brett at python.org', - 'Josiah Carlson' : 'jcarlson at uci.edu', - 'W Isaac Carroll' : 'icarroll at pobox.com', - 'Nick Coghlan' : 'ncoghlan at gmail.com', - 'Dave Cole' : 'djc at object-craft.com.au', - 'Christopher Craig' : 'python-pep at ccraig.org', - 'Laura Creighton' : 'lac at strakt.com', - 'Walter D?rwald' : '', - 'Fred L. Drake, Jr.' : 'fdrake at acm.org', - 'Michael P. Dubner' : 'dubnerm at mindless.com', - 'Paul F. Dubois' : 'paul at pfdubois.com', - 'Phillip J. Eby' : 'pje at telecommunity.com', - 'Micah Elliott' : 'mde at tracos.org', - 'Jeff Epler' : 'jepler at unpythonic.net', - 'David Eppstein' : 'eppstein at ics.uci.edu', - 'Clark C. Evans' : 'cce at clarkevans.com', - 'Greg Ewing' : 'greg at cosc.canterbury.ac.nz', - 'Martijn Faassen' : 'faassen at infrae.com', - 'Ben Finney' : 'ben+python at benfinney.id.au', - 'Fr?d?ric B. Giacometti' : 'fred at arakne.com', - 'Scott Gilbert' : 'xscottg at yahoo.com', - 'David Goodger' : 'goodger at python.org', - 'Grant Griffin' : 'g2 at iowegian.com', - 'Mark Hammond' : 'mhammond at skippinet.com.au', - 'Peter Harris' : 'scav at blueyonder.co.uk', - 'Thomas Heller' : 'theller at python.net', - 'Magnus Lie Hetland' : 'magnus at hetland.org', - 'Raymond D. Hettinger' : 'python at rcn.com', - 'Neil Hodgson' : 'neilh at scintilla.org', - 'Michael Hudson' : 'mwh at python.net', - 'Jeremy Hylton' : 'jeremy at zope.com', - 'Jack Jansen' : 'jack at cwi.nl', - 'Jim Jewett' : 'jimjjewett at users.sourceforge.net', - 'Richard Jones' : 'richard at mechanicalcat.net', - 'Stepan Koltsov' : 'yozh at mx1.ru', - 'A.M. Kuchling' : 'amk at amk.ca', - 'Marc-Andre Lemburg' : 'mal at lemburg.com', - 'Gregory Lielens' : 'gregory.lielens at fft.be', - 'Bj?rn Lindqvist' : 'bjourne at gmail.com', - 'Martin von L?wis' : 'loewis at informatik.hu-berlin.de', - 'Tony Lownds' : 'tony at pagedna.com', - 'Alex Martelli' : 'aleax at aleax.it', - 'Andrew McClelland' : 'eternalsquire at comcast.net', - 'Gordon McMillan' : 'gmcm at hypernet.com', - 'Andrew McNamara' : 'andrewm at object-craft.com.au', - 'Trent Mick' : 'trentm at activestate.com', - 'Mike Meyer' : 'mwm at mired.org', - 'Skip Montanaro' : 'skip at pobox.com', - 'Paul Moore' : 'gustav at morpheus.demon.co.uk', - 'Ben North' : 'ben at redfrontdoor.org', - 'Neal Norwitz' : 'nnorwitz at gmail.com', - 'Travis Oliphant' : 'oliphant at ee.byu.edu', - 'Jason Orendorff' : 'jason.orendorff at gmail.com', - 'Samuele Pedroni' : 'pedronis at python.org', - 'Michel Pelletier' : 'michel at users.sourceforge.net', - 'Tim Peters' : 'tim at zope.com', - 'Jason Petrone' : 'jp at demonseed.net', - 'Paul Prescod' : 'paul at prescod.net', - 'Terry Reedy' : 'tjreedy at udel.edu', - 'Sean Reifschneider' : 'jafo-pep at tummy.com', - 'Christian R. Reis' : 'kiko at async.com.br', - 'Jonathan Riehl' : 'jriehl at spaceship.com', - 'Andr? Roberge' : 'andre.roberge at gmail.com', - 'Guido van Rossum' : 'guido at python.org', - 'Just van Rossum' : 'just at letterror.com', - 'Vinay Sajip' : 'vinay_sajip at red-dove.com', - 'Neil Schemenauer' : 'nas at arctrix.com', - 'Peter Schneider-Kamp' : 'nowonder at nowonder.de', - 'Jiwon Seo' : 'seojiwon at gmail.com', - 'Kevin D. Smith' : 'Kevin.Smith at theMorgue.org', - 'Greg Stein' : 'gstein at lyra.org', - 'Daniel Stutzbach' : 'daniel.stutzbach at gmail.com', - 'Roman Suzi' : 'rnd at onego.ru', - 'Talin' : 'talin at acm.org', - 'Steven Taschuk' : 'staschuk at telusplanet.net', - 'Oren Tirosh' : 'oren at hishome.net', - 'Mike Verdone' : 'mike.verdone at gmail.com', - 'Gregory R. Warnes' : 'warnes at users.sourceforge.net', - 'Barry Warsaw' : 'barry at python.org', - 'Terence Way' : 'terry at wayforward.net', - 'Cliff Wells' : 'LogiplexSoftware at earthlink.net', - 'Greg Wilson' : 'gvwilson at ddj.com', - 'Collin Winter' : 'collinw at gmail.com', - 'Thomas Wouters' : 'thomas at python.org', - 'Ka-Ping Yee' : 'ping at zesty.ca', - 'Moshe Zadka' : 'moshez at zadka.site.co.il', - 'Huaiyu Zhu' : 'hzhu at users.sourceforge.net', -} +# Keep alphabetized! +email_addresses = ( + ('Aahz' , 'aahz at pobox.com'), + ('James C. Ahlstrom' , 'jim at interet.com'), + ('Jim Althoff' , 'james_althoff at i2.com'), + ('Kevin Altis' , 'altis at semi-retired.com'), + ('David Ascher' , 'davida at activestate.com'), + ('Peter Astrand' , 'astrand at lysator.liu.se'), + ('Carl Banks' , 'pythondev at aerojockey.com'), + ('Paul Barrett' , 'barrett at stsci.edu'), + ('Facundo Batista' , 'facundo at taniquetil.com.ar'), + ('Anthony Baxter' , 'anthony at interlink.com.au'), + ('Thomas Bellman' , 'bellman+pep-divmod at lysator.liu.se'), + ('Steven Bethard' , 'steven.bethard at gmail.com'), + ('Georg Brandl' , 'g.brandl at gmx.net'), + ('Brett Cannon' , 'brett at python.org'), + ('Josiah Carlson' , 'jcarlson at uci.edu'), + ('W Isaac Carroll' , 'icarroll at pobox.com'), + ('Nick Coghlan' , 'ncoghlan at gmail.com'), + ('Dave Cole' , 'djc at object-craft.com.au'), + ('Christopher Craig' , 'python-pep at ccraig.org'), + ('Laura Creighton' , 'lac at strakt.com'), + ('Walter D?rwald' , ''), + ('Fred L. Drake, Jr.' , 'fdrake at acm.org'), + ('Michael P. Dubner' , 'dubnerm at mindless.com'), + ('Paul F. Dubois' , 'paul at pfdubois.com'), + ('Phillip J. Eby' , 'pje at telecommunity.com'), + ('Micah Elliott' , 'mde at tracos.org'), + ('Jeff Epler' , 'jepler at unpythonic.net'), + ('David Eppstein' , 'eppstein at ics.uci.edu'), + ('Clark C. Evans' , 'cce at clarkevans.com'), + ('Greg Ewing' , 'greg at cosc.canterbury.ac.nz'), + ('Martijn Faassen' , 'faassen at infrae.com'), + ('Ben Finney' , 'ben+python at benfinney.id.au'), + ('Fr?d?ric B. Giacometti' , 'fred at arakne.com'), + ('Scott Gilbert' , 'xscottg at yahoo.com'), + ('David Goodger' , 'goodger at python.org'), + ('Grant Griffin' , 'g2 at iowegian.com'), + ('Mark Hammond' , 'mhammond at skippinet.com.au'), + ('Peter Harris' , 'scav at blueyonder.co.uk'), + ('Thomas Heller' , 'theller at python.net'), + ('Magnus Lie Hetland' , 'magnus at hetland.org'), + ('Raymond D. Hettinger' , 'python at rcn.com'), + ('Neil Hodgson' , 'neilh at scintilla.org'), + ('Michael Hudson' , 'mwh at python.net'), + ('Jeremy Hylton' , 'jeremy at zope.com'), + ('Jack Jansen' , 'jack at cwi.nl'), + ('Jim Jewett' , 'jimjjewett at users.sourceforge.net'), + ('Richard Jones' , 'richard at mechanicalcat.net'), + ('Stepan Koltsov' , 'yozh at mx1.ru'), + ('A.M. Kuchling' , 'amk at amk.ca'), + ('Marc-Andre Lemburg' , 'mal at lemburg.com'), + ('Gregory Lielens' , 'gregory.lielens at fft.be'), + ('Bj?rn Lindqvist' , 'bjourne at gmail.com'), + ('Martin von L?wis' , 'loewis at informatik.hu-berlin.de'), + ('Tony Lownds' , 'tony at pagedna.com'), + ('Alex Martelli' , 'aleax at aleax.it'), + ('Andrew McClelland' , 'eternalsquire at comcast.net'), + ('Gordon McMillan' , 'gmcm at hypernet.com'), + ('Andrew McNamara' , 'andrewm at object-craft.com.au'), + ('Trent Mick' , 'trentm at activestate.com'), + ('Mike Meyer' , 'mwm at mired.org'), + ('Skip Montanaro' , 'skip at pobox.com'), + ('Paul Moore' , 'gustav at morpheus.demon.co.uk'), + ('Ben North' , 'ben at redfrontdoor.org'), + ('Neal Norwitz' , 'nnorwitz at gmail.com'), + ('Travis Oliphant' , 'oliphant at ee.byu.edu'), + ('Jason Orendorff' , 'jason.orendorff at gmail.com'), + ('Samuele Pedroni' , 'pedronis at python.org'), + ('Michel Pelletier' , 'michel at users.sourceforge.net'), + ('Tim Peters' , 'tim at zope.com'), + ('Jason Petrone' , 'jp at demonseed.net'), + ('Paul Prescod' , 'paul at prescod.net'), + ('Terry Reedy' , 'tjreedy at udel.edu'), + ('Sean Reifschneider' , 'jafo-pep at tummy.com'), + ('Christian R. Reis' , 'kiko at async.com.br'), + ('Jonathan Riehl' , 'jriehl at spaceship.com'), + ('Andr? Roberge' , 'andre.roberge at gmail.com'), + ('Guido van Rossum' , 'guido at python.org'), + ('Just van Rossum' , 'just at letterror.com'), + ('Vinay Sajip' , 'vinay_sajip at red-dove.com'), + ('Neil Schemenauer' , 'nas at arctrix.com'), + ('Peter Schneider-Kamp' , 'nowonder at nowonder.de'), + ('Jiwon Seo' , 'seojiwon at gmail.com'), + ('Kevin D. Smith' , 'Kevin.Smith at theMorgue.org'), + ('Greg Stein' , 'gstein at lyra.org'), + ('Daniel Stutzbach' , 'daniel.stutzbach at gmail.com'), + ('Roman Suzi' , 'rnd at onego.ru'), + ('Talin' , 'talin at acm.org'), + ('Steven Taschuk' , 'staschuk at telusplanet.net'), + ('Oren Tirosh' , 'oren at hishome.net'), + ('Mike Verdone' , 'mike.verdone at gmail.com'), + ('Gregory R. Warnes' , 'warnes at users.sourceforge.net'), + ('Barry Warsaw' , 'barry at python.org'), + ('Terence Way' , 'terry at wayforward.net'), + ('Cliff Wells' , 'LogiplexSoftware at earthlink.net'), + ('Greg Wilson' , 'gvwilson at ddj.com'), + ('Collin Winter' , 'collinw at gmail.com'), + ('Thomas Wouters' , 'thomas at python.org'), + ('Ka-Ping Yee' , 'ping at zesty.ca'), + ('Moshe Zadka' , 'moshez at zadka.site.co.il'), + ('Huaiyu Zhu' , 'hzhu at users.sourceforge.net'), +) From python-checkins at python.org Fri Jun 15 05:48:14 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 05:48:14 +0200 (CEST) Subject: [Python-checkins] r55990 - sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070615034814.4090E1E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 05:48:10 2007 New Revision: 55990 Modified: sandbox/trunk/pep0/pep0/pep.py Log: Import 'constants' instead of parts of the module. Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Fri Jun 15 05:48:10 2007 @@ -1,5 +1,5 @@ """Code for handling object representation of a PEP.""" -from .constants import nicknames, column_format +from . import constants import re @@ -117,10 +117,10 @@ else: status_abbr = self.status[0].upper() pep_info['status'] = status_abbr - author_string = ', '.join(last_name(author, nicknames) + author_string = ', '.join(last_name(author, constants.nicknames) for author in self.authors) pep_info['authors'] = author_string - return column_format % pep_info + return constants.column_format % pep_info def last_name(full_name, nicknames={}): From python-checkins at python.org Fri Jun 15 05:52:15 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 05:52:15 +0200 (CEST) Subject: [Python-checkins] r55992 - in sandbox/trunk/pep0: NOTES pep0/output.py Message-ID: <20070615035215.450FB1E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 05:52:05 2007 New Revision: 55992 Modified: sandbox/trunk/pep0/NOTES sandbox/trunk/pep0/pep0/output.py Log: Output author list. Modified: sandbox/trunk/pep0/NOTES ============================================================================== --- sandbox/trunk/pep0/NOTES (original) +++ sandbox/trunk/pep0/NOTES Fri Jun 15 05:52:05 2007 @@ -4,15 +4,14 @@ * Read PEPs as UTF-8. * Author/email list. - + names - + emails + + Fix loss of a single space when name contains an accented character. + Column headers. - Underline to length of author name or just column header like in rest of doc? * Verify PEP is well-formatted. + Values in fields correct. - - All authors declared in authors.py. + - All authors declared in email list. + Formatting correct. - Plaintext. - reST. Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Fri Jun 15 05:52:05 2007 @@ -1,7 +1,8 @@ """Code to handle the output of PEP 0.""" from . import constants -from .pep import PEP +from .pep import PEP, last_name +from operator import itemgetter from sys import stdout @@ -117,13 +118,27 @@ print>>output print>>output, "Owners" print>>output - # XXX - # * get "last, first I." of each name. - # * add nickname. - # * find longest name. - # * column headers. - # * name/email with a two-space separation between longest name and email. - print>>output, ' XXX' + max_name_len = len(max(constants.email_addresses, key=itemgetter(0))) + for name, nick in constants.nicknames.items(): + name_nick_len = len(name) + len(nick) + 3 # Cover space and parens. + if name_nick_len > max_name_len: + max_name_len = name_nick_len + else: + max_name_len += 2 # Cover comma and space between last and first name. + print>>output, " %s %s" % ('name'.ljust(max_name_len), 'email address') + print>>output, " %s %s" % ((len('name')*'-').ljust(max_name_len), + len('email address')*'-') + for author, email in constants.email_addresses: + last_name_index = author.index(last_name(author)) + first = author[:last_name_index].strip() + last = author[last_name_index:].strip() + if not first: + last_first = last + else: + last_first = ', '.join([last, first]) + if author in constants.nicknames: + last_first += " (%s)" % constants.nicknames[author] + print>>output, " %s %s" % (last_first.ljust(max_name_len), email) print>>output print>>output print>>output, "References" From python-checkins at python.org Fri Jun 15 05:53:40 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 05:53:40 +0200 (CEST) Subject: [Python-checkins] r55993 - sandbox/trunk/pep0/pep0/constants.py Message-ID: <20070615035340.10CBA1E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 05:53:36 2007 New Revision: 55993 Modified: sandbox/trunk/pep0/pep0/constants.py Log: Update references. Modified: sandbox/trunk/pep0/pep0/constants.py ============================================================================== --- sandbox/trunk/pep0/pep0/constants.py (original) +++ sandbox/trunk/pep0/pep0/constants.py Fri Jun 15 05:53:36 2007 @@ -26,9 +26,6 @@ references = """ [1] View PEP history online http://svn.python.org/projects/peps/trunk/ - - [2] The Benevolent Dictator For Life's Parade of PEPs - http://www.python.org/doc/essays/pepparade.html """ footer = """ From python-checkins at python.org Fri Jun 15 05:59:41 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 05:59:41 +0200 (CEST) Subject: [Python-checkins] r55994 - in sandbox/trunk/pep0: NOTES pep0/pep.py Message-ID: <20070615035941.A55EC1E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 05:59:31 2007 New Revision: 55994 Modified: sandbox/trunk/pep0/NOTES sandbox/trunk/pep0/pep0/pep.py Log: Add code to verify author names. Leave commented out, though, as there is an obvious disparity between the author names in the PEPs and those in the index. Modified: sandbox/trunk/pep0/NOTES ============================================================================== --- sandbox/trunk/pep0/NOTES (original) +++ sandbox/trunk/pep0/NOTES Fri Jun 15 05:59:31 2007 @@ -5,13 +5,8 @@ * Author/email list. + Fix loss of a single space when name contains an accented character. - + Column headers. - - Underline to length of author name or just column header like in - rest of doc? * Verify PEP is well-formatted. - + Values in fields correct. - - All authors declared in email list. + Formatting correct. - Plaintext. - reST. @@ -55,3 +50,5 @@ - Conflicts with Accepted and Deferred initials, respectively. - Worth using other letters? + * Disparity between author name in PEPs and listed in index. + + E.g., "Barry A. Warsaw" and "Warsaw, Barry". Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Fri Jun 15 05:59:31 2007 @@ -32,6 +32,9 @@ status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", "Active", "Draft") + # XXX Uncomment to valid author names (along with code in __init__). + #valid_authors = set(x[0] for x in constants.email_addresses) + def __init__(self, metadata_dict): """Init object based on dict containing metadata from a file. @@ -77,6 +80,10 @@ self.status = status # 'Author'. authors = self._parse_author(metadata_dict['Author']) + # XXX Uncomment (plus valid_authors) to validate author names. + #for author in authors: + # if author not in self.valid_authors: + # raise ValueError("%s is not a valid author name" % author) if len(authors) < 1: raise ValueError("no authors found (PEP %s)" % self.number) self.authors = authors From python-checkins at python.org Fri Jun 15 19:10:45 2007 From: python-checkins at python.org (thomas.heller) Date: Fri, 15 Jun 2007 19:10:45 +0200 (CEST) Subject: [Python-checkins] r55995 - python/branches/release25-maint/Modules/_ctypes python/branches/release25-maint/Modules/_ctypes/callproc.c python/branches/release25-maint/Modules/_ctypes/ctypes.h Message-ID: <20070615171045.AD6711E400C@bag.python.org> Author: thomas.heller Date: Fri Jun 15 19:10:41 2007 New Revision: 55995 Modified: python/branches/release25-maint/Modules/_ctypes/ (props changed) python/branches/release25-maint/Modules/_ctypes/callproc.c python/branches/release25-maint/Modules/_ctypes/ctypes.h Log: Merged revisions 55896 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk/Modules/_ctypes ........ r55896 | thomas.heller | 2007-06-11 17:58:33 +0200 (Mo, 11 Jun 2007) | 3 lines Use "O&" in calls to PyArg_Parse when we need a 'void*' instead of "k" or "K" codes. ........ Modified: python/branches/release25-maint/Modules/_ctypes/callproc.c ============================================================================== --- python/branches/release25-maint/Modules/_ctypes/callproc.c (original) +++ python/branches/release25-maint/Modules/_ctypes/callproc.c Fri Jun 15 19:10:41 2007 @@ -1029,6 +1029,15 @@ return retval; } +static int +_parse_voidp(PyObject *obj, void **address) +{ + *address = PyLong_AsVoidPtr(obj); + if (*address == NULL) + return 0; + return 1; +} + #ifdef MS_WIN32 #ifdef _UNICODE @@ -1112,7 +1121,7 @@ static PyObject *free_library(PyObject *self, PyObject *args) { void *hMod; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":FreeLibrary", &hMod)) + if (!PyArg_ParseTuple(args, "O&:FreeLibrary", &_parse_voidp, &hMod)) return NULL; if (!FreeLibrary((HMODULE)hMod)) return PyErr_SetFromWindowsErr(GetLastError()); @@ -1235,7 +1244,7 @@ { void *handle; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE ":dlclose", &handle)) + if (!PyArg_ParseTuple(args, "O&:dlclose", &_parse_voidp, &handle)) return NULL; if (dlclose(handle)) { PyErr_SetString(PyExc_OSError, @@ -1252,7 +1261,8 @@ void *handle; void *ptr; - if (!PyArg_ParseTuple(args, PY_VOID_P_CODE "s:dlsym", &handle, &name)) + if (!PyArg_ParseTuple(args, "O&s:dlsym", + &_parse_voidp, &handle, &name)) return NULL; ptr = ctypes_dlsym(handle, name); if (!ptr) { @@ -1277,8 +1287,8 @@ PyObject *result; if (!PyArg_ParseTuple(args, - PY_VOID_P_CODE "O!", - &func, + "O&O!", + &_parse_voidp, &func, &PyTuple_Type, &arguments)) return NULL; @@ -1308,8 +1318,8 @@ PyObject *result; if (!PyArg_ParseTuple(args, - PY_VOID_P_CODE "O!", - &func, + "O&O!", + &_parse_voidp, &func, &PyTuple_Type, &arguments)) return NULL; Modified: python/branches/release25-maint/Modules/_ctypes/ctypes.h ============================================================================== --- python/branches/release25-maint/Modules/_ctypes/ctypes.h (original) +++ python/branches/release25-maint/Modules/_ctypes/ctypes.h Fri Jun 15 19:10:41 2007 @@ -23,12 +23,6 @@ #define PY_LONG_LONG LONG_LONG #endif -#if SIZEOF_VOID_P == SIZEOF_LONG -#define PY_VOID_P_CODE "k" -#elif defined(HAVE_LONG_LONG) && (SIZEOF_VOID_P == SIZEOF_LONG_LONG) -#define PY_VOID_P_CODE "K" -#endif - typedef struct tagPyCArgObject PyCArgObject; typedef struct tagCDataObject CDataObject; typedef PyObject *(* GETFUNC)(void *, unsigned size); From python-checkins at python.org Fri Jun 15 19:47:03 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 15 Jun 2007 19:47:03 +0200 (CEST) Subject: [Python-checkins] r55996 - python/branches/cpy_merge/Lib/io.py Message-ID: <20070615174703.ED06E1E4003@bag.python.org> Author: alexandre.vassalotti Date: Fri Jun 15 19:47:00 2007 New Revision: 55996 Modified: python/branches/cpy_merge/Lib/io.py Log: Rename StringIO to _StringIO. Modified: python/branches/cpy_merge/Lib/io.py ============================================================================== --- python/branches/cpy_merge/Lib/io.py (original) +++ python/branches/cpy_merge/Lib/io.py Fri Jun 15 19:47:00 2007 @@ -595,7 +595,7 @@ # XXX This should inherit from TextIOBase -class StringIO(_MemoryIOMixin): +class _StringIO(_MemoryIOMixin): """Buffered I/O implementation using a string buffer, like StringIO.""" From python-checkins at python.org Fri Jun 15 23:37:26 2007 From: python-checkins at python.org (brett.cannon) Date: Fri, 15 Jun 2007 23:37:26 +0200 (CEST) Subject: [Python-checkins] r55997 - peps/trunk/pep-0000.txt peps/trunk/pep-0210.txt peps/trunk/pep-0220.txt Message-ID: <20070615213726.BF7011E4003@bag.python.org> Author: brett.cannon Date: Fri Jun 15 23:37:20 2007 New Revision: 55997 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0210.txt peps/trunk/pep-0220.txt Log: Reject long-standing empty PEPs. Also allows for the removal of the empty PEP section from the categorical index. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Fri Jun 15 23:37:20 2007 @@ -178,22 +178,19 @@ SF 3129 Class Decorators Winter SF 3132 Extended Iterable Unpacking Brandl - Empty PEPs (or containing only an abstract) - - SD 210 Decoupling the Interpreter Loop Ascher - ID 220 Coroutines, Generators, Continuations McMillan - Deferred, Abandoned, Withdrawn, and Rejected PEPs SR 204 Range Literals Wouters IW 206 Python Advanced Library Kuchling SW 209 Adding Multidimensional Arrays Barrett, Oliphant + SR 210 Decoupling the Interpreter Loop Ascher SD 211 Adding A New Outer Product Operator Wilson SD 212 Loop Counter Iteration Schneider-Kamp SD 213 Attribute Access Handlers Prescod SR 215 String Interpolation Yee IR 216 Docstring Format Zadka SD 219 Stackless Python McMillan + IR 220 Coroutines, Generators, Continuations McMillan SD 222 Web Library Enhancements Kuchling SR 224 Attribute Docstrings Lemburg SD 225 Elementwise/Objectwise Operators Zhu, Lielens @@ -309,7 +306,7 @@ SF 207 Rich Comparisons GvR, Ascher SF 208 Reworking the Coercion Model Schemenauer, Lemburg SW 209 Adding Multidimensional Arrays Barrett, Oliphant - SD 210 Decoupling the Interpreter Loop Ascher + SR 210 Decoupling the Interpreter Loop Ascher SD 211 Adding A New Outer Product Operator Wilson SD 212 Loop Counter Iteration Schneider-Kamp SD 213 Attribute Access Handlers Prescod @@ -319,7 +316,7 @@ SF 217 Display Hook for Interactive Use Zadka SF 218 Adding a Built-In Set Object Type Wilson, Hettinger SD 219 Stackless Python McMillan - ID 220 Coroutines, Generators, Continuations McMillan + IR 220 Coroutines, Generators, Continuations McMillan SF 221 Import As Wouters SD 222 Web Library Enhancements Kuchling SF 223 Change the Meaning of \x Escapes Peters Modified: peps/trunk/pep-0210.txt ============================================================================== --- peps/trunk/pep-0210.txt (original) +++ peps/trunk/pep-0210.txt Fri Jun 15 23:37:20 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: davida at activestate.com (David Ascher) -Status: Deferred +Status: Rejected Type: Standards Track Python-Version: 2.1 Created: 15-Jul-2000 Modified: peps/trunk/pep-0220.txt ============================================================================== --- peps/trunk/pep-0220.txt (original) +++ peps/trunk/pep-0220.txt Fri Jun 15 23:37:20 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: gmcm at hypernet.com (Gordon McMillan) -Status: Active +Status: Rejected Type: Informational Created: 14-Aug-2000 Post-History: From python-checkins at python.org Sat Jun 16 00:22:33 2007 From: python-checkins at python.org (brett.cannon) Date: Sat, 16 Jun 2007 00:22:33 +0200 (CEST) Subject: [Python-checkins] r55998 - sandbox/trunk/pep0/pep0/output.py Message-ID: <20070615222233.6A1D81E4003@bag.python.org> Author: brett.cannon Date: Sat Jun 16 00:22:23 2007 New Revision: 55998 Modified: sandbox/trunk/pep0/pep0/output.py Log: Remove empty PEPs as they no longer are valid. Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Sat Jun 16 00:22:23 2007 @@ -20,14 +20,13 @@ def sort_peps(peps): - """Sort PEPs into meta, informational, accepted, open, finished, empty, + """Sort PEPs into meta, informational, accepted, open, finished, and essentially dead.""" meta = [] info = [] accepted = [] open_ = [] finished = [] - empty = [] dead = [] for pep in peps: # Order of 'if' statement important. Key Status values take precedence @@ -45,7 +44,7 @@ accepted.append(pep) elif pep.status == 'Final': finished.append(pep) - return meta, info, accepted, open_, finished, empty, dead + return meta, info, accepted, open_, finished, dead def write_pep0(peps, output=stdout): @@ -57,7 +56,7 @@ print>>output, "Index by Category" print>>output write_column_headers(output) - meta, info, accepted, open_, finished, empty, dead = sort_peps(peps) + meta, info, accepted, open_, finished, dead = sort_peps(peps) print>>output print>>output, " Meta-PEPs (PEPs about PEPs or Processs)" print>>output @@ -84,11 +83,6 @@ for pep in finished: print>>output, pep print>>output - print>>output, " Empty PEPs (or containing only abstract)" - print>>output - for pep in empty: - print>>output, pep - print>>output print>>output, " Deferred, Abandoned, Withdrawn, and Rejected PEPs" print>>output for pep in dead: From python-checkins at python.org Sat Jun 16 00:29:18 2007 From: python-checkins at python.org (brett.cannon) Date: Sat, 16 Jun 2007 00:29:18 +0200 (CEST) Subject: [Python-checkins] r55999 - sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070615222918.4E7B21E4003@bag.python.org> Author: brett.cannon Date: Sat Jun 16 00:29:17 2007 New Revision: 55999 Modified: sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Log: Add support for replaced PEPs. This also led to tightening up error reporting when sorting PEPs if the PEP couldn't be sorted. That led to tweaking the sort algorithm. Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Sat Jun 16 00:29:17 2007 @@ -34,16 +34,19 @@ if pep.status == 'Draft': open_.append(pep) elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', - 'Incomplete'): + 'Incomplete', 'Replaced'): dead.append(pep) elif pep.type_ == 'Process': meta.append(pep) elif pep.type_ == 'Informational': info.append(pep) - elif pep.status == 'Accepted': + elif pep.status in ('Accepted', 'Active'): accepted.append(pep) elif pep.status == 'Final': finished.append(pep) + else: + raise ValueError("PEP %s unsorted (%s/%s)" % (pep.number, + pep.type_, pep.status)) return meta, info, accepted, open_, finished, dead Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Sat Jun 16 00:29:17 2007 @@ -30,7 +30,7 @@ type_values = ("Standards Track", "Informational", "Process") # Active and Draft are not listed in the index. status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", - "Active", "Draft") + "Active", "Draft", "Replaced") # XXX Uncomment to valid author names (along with code in __init__). #valid_authors = set(x[0] for x in constants.email_addresses) From python-checkins at python.org Sat Jun 16 00:30:03 2007 From: python-checkins at python.org (brett.cannon) Date: Sat, 16 Jun 2007 00:30:03 +0200 (CEST) Subject: [Python-checkins] r56000 - sandbox/trunk/pep0/NOTES Message-ID: <20070615223003.88EA31E4003@bag.python.org> Author: brett.cannon Date: Sat Jun 16 00:30:02 2007 New Revision: 56000 Modified: sandbox/trunk/pep0/NOTES Log: Update notes based on the fact that empty PEPs no longer exist. Modified: sandbox/trunk/pep0/NOTES ============================================================================== --- sandbox/trunk/pep0/NOTES (original) +++ sandbox/trunk/pep0/NOTES Sat Jun 16 00:30:02 2007 @@ -27,9 +27,6 @@ - Meta-PEPs are not delineated as such (e.g., usually specified as Informative). - + Status field. - - Empty PEPs are not specified as such. - * In the index: * Counting gap in numerical index and a newline. From python-checkins at python.org Sat Jun 16 00:43:09 2007 From: python-checkins at python.org (andrew.kuchling) Date: Sat, 16 Jun 2007 00:43:09 +0200 (CEST) Subject: [Python-checkins] r56001 - python/trunk/Doc/howto/unicode.rst Message-ID: <20070615224309.B2A6B1E4003@bag.python.org> Author: andrew.kuchling Date: Sat Jun 16 00:43:03 2007 New Revision: 56001 Modified: python/trunk/Doc/howto/unicode.rst Log: Add a word Modified: python/trunk/Doc/howto/unicode.rst ============================================================================== --- python/trunk/Doc/howto/unicode.rst (original) +++ python/trunk/Doc/howto/unicode.rst Sat Jun 16 00:43:03 2007 @@ -152,7 +152,7 @@ 4. Many Internet standards are defined in terms of textual data, and can't handle content with embedded zero bytes. -Generally people don't use this encoding, choosing other encodings +Generally people don't use this encoding, instead choosing other encodings that are more efficient and convenient. Encodings don't have to handle every possible Unicode character, and From python-checkins at python.org Sat Jun 16 02:02:00 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Sat, 16 Jun 2007 02:02:00 +0200 (CEST) Subject: [Python-checkins] r56002 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070616000200.C16371E4003@bag.python.org> Author: alexandre.vassalotti Date: Sat Jun 16 02:01:57 2007 New Revision: 56002 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Changes for compatibility with PEP 3116. * The truncate method of BytesIO and StringIO now return the new size of the internal buffer. * Make writable, readable and seekable methods, instead of properties. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Sat Jun 16 02:01:57 2007 @@ -115,7 +115,7 @@ /* Generic getter for the writable, readable and seekable properties */ static PyObject * -bytes_io_get_true(BytesIOObject *self) +generic_true(BytesIOObject *self) { Py_RETURN_TRUE; } @@ -269,7 +269,7 @@ self->string_size = size; self->pos = self->string_size; - Py_RETURN_NONE; + return PyInt_FromSsize_t(self->string_size); } static PyObject * @@ -490,11 +490,10 @@ "tell() -> current file position, an integer\n"); PyDoc_STRVAR(BytesIO_truncate_doc, -"truncate([size]) -> None. Truncate the file to at most size bytes.\n" +"truncate([size]) -> int. Truncate the file to at most size bytes.\n" "\n" "Size defaults to the current file position, as returned by tell().\n" -"If the specified size exceeds the file's current size, the file\n" -"remains unchanged."); +"Returns the new size."); PyDoc_STRVAR(BytesIO_close_doc, "close() -> None. Close the file and release the resources held."); @@ -519,20 +518,22 @@ "Note that newlines are not added. The sequence can be any iterable object\n" "producing strings. This is equivalent to calling write() for each string."); +PyDoc_STRVAR(generic_true_doc, "Always True."); + static PyGetSetDef BytesIO_getsetlist[] = { {"closed", (getter) bytes_io_get_closed, NULL, "True if the file is closed."}, - {"writeable", (getter) bytes_io_get_true, NULL, - "Always True."}, - {"readable", (getter) bytes_io_get_true, NULL, - "Always True."}, - {"seekable", (getter) bytes_io_get_true, NULL, - "Always True."}, {0}, /* sentinel */ }; static struct PyMethodDef BytesIO_methods[] = { + {"readable", (PyCFunction) generic_true, METH_NOARGS, + generic_true_doc}, + {"seekable", (PyCFunction) generic_true, METH_NOARGS, + generic_true_doc}, + {"writable", (PyCFunction) generic_true, METH_NOARGS, + generic_true_doc}, {"flush", (PyCFunction) bytes_io_flush, METH_NOARGS, BytesIO_flush_doc}, {"getvalue", (PyCFunction) bytes_io_getvalue, METH_VARARGS, Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Sat Jun 16 02:01:57 2007 @@ -118,7 +118,7 @@ /* Generic getter for the writable, readable and seekable properties */ static PyObject * -string_io_get_true(StringIOObject *self) +generic_true(StringIOObject *self) { Py_RETURN_TRUE; } @@ -272,7 +272,7 @@ self->string_size = size; self->pos = self->string_size; - Py_RETURN_NONE; + return PyInt_FromSsize_t(self->string_size); } static PyObject * @@ -500,11 +500,10 @@ "tell() -> current file position, an integer\n"); PyDoc_STRVAR(StringIO_truncate_doc, -"truncate([size]) -> None. Truncate the file to at most size bytes.\n" +"truncate([size]) -> int. Truncate the file to at most size bytes.\n" "\n" "Size defaults to the current file position, as returned by tell().\n" -"If the specified size exceeds the file's current size, the file\n" -"remains unchanged."); +"Returns the new size."); PyDoc_STRVAR(StringIO_close_doc, "close() -> None. Close the file and release the resources held."); @@ -529,20 +528,22 @@ "Note that newlines are not added. The sequence can be any iterable object\n" "producing strings. This is equivalent to calling write() for each string."); +PyDoc_STRVAR(generic_true_doc, "Always True."); + static PyGetSetDef StringIO_getsetlist[] = { {"closed", (getter) string_io_get_closed, NULL, "True if the file is closed"}, - {"writeable", (getter) string_io_get_true, NULL, - "Always True."}, - {"readable", (getter) string_io_get_true, NULL, - "Always True."}, - {"seekable", (getter) string_io_get_true, NULL, - "Always True."}, {0}, /* sentinel */ }; static struct PyMethodDef StringIO_methods[] = { + {"readable", (PyCFunction) generic_true, METH_NOARGS, + generic_true_doc}, + {"seekable", (PyCFunction) generic_true, METH_NOARGS, + generic_true_doc}, + {"writable", (PyCFunction) generic_true, METH_NOARGS, + generic_true_doc}, {"flush", (PyCFunction) string_io_flush, METH_NOARGS, StringIO_flush_doc}, {"getvalue", (PyCFunction) string_io_getvalue, METH_VARARGS, From python-checkins at python.org Sat Jun 16 12:08:47 2007 From: python-checkins at python.org (martin.v.loewis) Date: Sat, 16 Jun 2007 12:08:47 +0200 (CEST) Subject: [Python-checkins] r56005 - python/trunk/Misc/developers.txt Message-ID: <20070616100847.474C51E4003@bag.python.org> Author: martin.v.loewis Date: Sat Jun 16 12:08:43 2007 New Revision: 56005 Modified: python/trunk/Misc/developers.txt Log: Mention Senthil Kumaran. Modified: python/trunk/Misc/developers.txt ============================================================================== --- python/trunk/Misc/developers.txt (original) +++ python/trunk/Misc/developers.txt Sat Jun 16 12:08:43 2007 @@ -17,6 +17,10 @@ Permissions History ------------------- +- Senthil Kumaran was given SVN access on June 16 2007 + by MvL, for his Summer-of-Code project, mentored by + Skip Montanaro. + - Alexandre Vassalotti was given SVN access on May 21 2007 by MvL, for his Summer-of-Code project, mentored by Brett Cannon. From python-checkins at python.org Sat Jun 16 19:10:17 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 16 Jun 2007 19:10:17 +0200 (CEST) Subject: [Python-checkins] r56006 - python/trunk/Doc/api/concrete.tex Message-ID: <20070616171017.EEFD41E4003@bag.python.org> Author: georg.brandl Date: Sat Jun 16 19:10:12 2007 New Revision: 56006 Modified: python/trunk/Doc/api/concrete.tex Log: Add missing \versionadded. Modified: python/trunk/Doc/api/concrete.tex ============================================================================== --- python/trunk/Doc/api/concrete.tex (original) +++ python/trunk/Doc/api/concrete.tex Sat Jun 16 19:10:12 2007 @@ -99,6 +99,7 @@ \begin{csimplemacrodesc}{Py_RETURN_NONE} Properly handle returning \cdata{Py_None} from within a C function. + \versionadded{2.4} \end{csimplemacrodesc} From python-checkins at python.org Sat Jun 16 19:10:30 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 16 Jun 2007 19:10:30 +0200 (CEST) Subject: [Python-checkins] r56007 - python/branches/release25-maint/Doc/api/concrete.tex Message-ID: <20070616171030.19E241E4003@bag.python.org> Author: georg.brandl Date: Sat Jun 16 19:10:26 2007 New Revision: 56007 Modified: python/branches/release25-maint/Doc/api/concrete.tex Log: Add missing \versionadded. (backport from rev. 56006) Modified: python/branches/release25-maint/Doc/api/concrete.tex ============================================================================== --- python/branches/release25-maint/Doc/api/concrete.tex (original) +++ python/branches/release25-maint/Doc/api/concrete.tex Sat Jun 16 19:10:26 2007 @@ -99,6 +99,7 @@ \begin{csimplemacrodesc}{Py_RETURN_NONE} Properly handle returning \cdata{Py_None} from within a C function. + \versionadded{2.4} \end{csimplemacrodesc} From python-checkins at python.org Sun Jun 17 19:44:17 2007 From: python-checkins at python.org (brett.cannon) Date: Sun, 17 Jun 2007 19:44:17 +0200 (CEST) Subject: [Python-checkins] r56008 - sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070617174417.727B61E400A@bag.python.org> Author: brett.cannon Date: Sun Jun 17 19:44:13 2007 New Revision: 56008 Modified: sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/pep.py Log: Update output so that title that go beyond the max title length (currently 44), use textwrap.wrap to truncate to a shorter length and have an ellipsis tacked on. Modified: sandbox/trunk/pep0/pep0/constants.py ============================================================================== --- sandbox/trunk/pep0/pep0/constants.py (original) +++ sandbox/trunk/pep0/pep0/constants.py Sun Jun 17 19:44:13 2007 @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- -column_format = ' %(type)1s%(status)1s %(number)4s %(title)-44s %(authors)-s' +title_length = 44 +column_format = (' %(type)1s%(status)1s %(number)4s %(title)-' + + str(title_length) + 's %(authors)-s') header = """PEP: 0 Title: Index of Python Enhancement Proposals (PEPs) Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Sun Jun 17 19:44:13 2007 @@ -2,6 +2,7 @@ from . import constants import re +import textwrap class PEP(object): @@ -90,6 +91,8 @@ def _parse_author(self, data): """Return a list of author names.""" + # XXX Consider using email.utils.parseaddr (doesn't work with names + # lacking an email address. angled = r'(?P.+?) <.+?>' paren = r'.+? \((?P.+?)\)' simple = r'(?P[^,]+)' @@ -115,18 +118,40 @@ return author_list - def __str__(self): - """Return the line entry for the PEP.""" - pep_info = {'type': self.type_[0].upper(), 'number': str(self.number), - 'title': self.title} + @property + def type_abbr(self): + """Return the how the type is to be represented in the index.""" + return self.type_[0].upper() + + + @property + def status_abbr(self): + """Return how the status should be represented in the index.""" if self.status in ('Draft', 'Active'): - status_abbr = ' ' + return ' ' else: - status_abbr = self.status[0].upper() - pep_info['status'] = status_abbr - author_string = ', '.join(last_name(author, constants.nicknames) - for author in self.authors) - pep_info['authors'] = author_string + return self.status[0].upper() + + @property + def author_abbr(self): + """Return the author list as a comma-separated with only last names.""" + return ', '.join(last_name(author, constants.nicknames) + for author in self.authors) + + @property + def title_abbr(self): + """Shorten the title to be no longer than the max title length.""" + if len(self.title) <= constants.title_length: + return self.title + wrapped_title = textwrap.wrap(self.title, constants.title_length - 4) + return wrapped_title[0] + ' ...' + + + def __str__(self): + """Return the line entry for the PEP.""" + pep_info = {'type': self.type_abbr, 'number': str(self.number), + 'title': self.title_abbr, 'status': self.status_abbr, + 'authors': self.author_abbr} return constants.column_format % pep_info From python-checkins at python.org Sun Jun 17 20:48:36 2007 From: python-checkins at python.org (neal.norwitz) Date: Sun, 17 Jun 2007 20:48:36 +0200 (CEST) Subject: [Python-checkins] r56009 - python/trunk/Doc/lib/libsqlite3.tex Message-ID: <20070617184836.6AB991E4005@bag.python.org> Author: neal.norwitz Date: Sun Jun 17 20:48:32 2007 New Revision: 56009 Modified: python/trunk/Doc/lib/libsqlite3.tex Log: SF #1738670, make example in doc work Modified: python/trunk/Doc/lib/libsqlite3.tex ============================================================================== --- python/trunk/Doc/lib/libsqlite3.tex (original) +++ python/trunk/Doc/lib/libsqlite3.tex Sun Jun 17 20:48:32 2007 @@ -42,6 +42,12 @@ # Insert a row of data c.execute("""insert into stocks values ('2006-01-05','BUY','RHAT',100,35.14)""") + +# Save (commit) the changes +conn.commit() + +# We can also close the cursor if we are done with it +c.close() \end{verbatim} Usually your SQL operations will need to use values from Python From python-checkins at python.org Sun Jun 17 20:49:43 2007 From: python-checkins at python.org (neal.norwitz) Date: Sun, 17 Jun 2007 20:49:43 +0200 (CEST) Subject: [Python-checkins] r56010 - python/branches/release25-maint/Doc/lib/libsqlite3.tex Message-ID: <20070617184943.CF7EF1E4005@bag.python.org> Author: neal.norwitz Date: Sun Jun 17 20:49:42 2007 New Revision: 56010 Modified: python/branches/release25-maint/Doc/lib/libsqlite3.tex Log: SF #1738670, make example in doc work Modified: python/branches/release25-maint/Doc/lib/libsqlite3.tex ============================================================================== --- python/branches/release25-maint/Doc/lib/libsqlite3.tex (original) +++ python/branches/release25-maint/Doc/lib/libsqlite3.tex Sun Jun 17 20:49:42 2007 @@ -42,6 +42,12 @@ # Insert a row of data c.execute("""insert into stocks values ('2006-01-05','BUY','RHAT',100,35.14)""") + +# Save (commit) the changes +conn.commit() + +# We can also close the cursor if we are done with it +c.close() \end{verbatim} Usually your SQL operations will need to use values from Python From python-checkins at python.org Mon Jun 18 04:46:39 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 18 Jun 2007 04:46:39 +0200 (CEST) Subject: [Python-checkins] r56011 - python/trunk/Doc/tut/tut.tex Message-ID: <20070618024639.B09BB1E4005@bag.python.org> Author: neal.norwitz Date: Mon Jun 18 04:46:36 2007 New Revision: 56011 Modified: python/trunk/Doc/tut/tut.tex Log: SF #1738754, remove extra backslash in string Modified: python/trunk/Doc/tut/tut.tex ============================================================================== --- python/trunk/Doc/tut/tut.tex (original) +++ python/trunk/Doc/tut/tut.tex Mon Jun 18 04:46:36 2007 @@ -605,7 +605,7 @@ >>> "\"Yes,\" he said." '"Yes," he said.' >>> '"Isn\'t," she said.' -'"Isn\'t," she said.' +'"Isn't," she said.' \end{verbatim} String literals can span multiple lines in several ways. Continuation From python-checkins at python.org Mon Jun 18 04:50:20 2007 From: python-checkins at python.org (neal.norwitz) Date: Mon, 18 Jun 2007 04:50:20 +0200 (CEST) Subject: [Python-checkins] r56012 - python/trunk/Doc/tut/tut.tex Message-ID: <20070618025020.505501E4005@bag.python.org> Author: neal.norwitz Date: Mon Jun 18 04:50:15 2007 New Revision: 56012 Modified: python/trunk/Doc/tut/tut.tex Log: Revert last change for SF #1738754, there's no print in there. Modified: python/trunk/Doc/tut/tut.tex ============================================================================== --- python/trunk/Doc/tut/tut.tex (original) +++ python/trunk/Doc/tut/tut.tex Mon Jun 18 04:50:15 2007 @@ -605,7 +605,7 @@ >>> "\"Yes,\" he said." '"Yes," he said.' >>> '"Isn\'t," she said.' -'"Isn't," she said.' +'"Isn\'t," she said.' \end{verbatim} String literals can span multiple lines in several ways. Continuation From nnorwitz at gmail.com Mon Jun 18 11:08:46 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Mon, 18 Jun 2007 05:08:46 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070618090846.GA6272@python.psfb.org> test_popen2 leaked [0, 26, -26] references, sum=0 test_threadsignals leaked [0, 0, -8] references, sum=-8 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Mon Jun 18 13:42:16 2007 From: python-checkins at python.org (lars.gustaebel) Date: Mon, 18 Jun 2007 13:42:16 +0200 (CEST) Subject: [Python-checkins] r56019 - in python/trunk: Doc/lib/libtarfile.tex Lib/tarfile.py Lib/test/test_tarfile.py Misc/NEWS Message-ID: <20070618114216.100351E4006@bag.python.org> Author: lars.gustaebel Date: Mon Jun 18 13:42:11 2007 New Revision: 56019 Modified: python/trunk/Doc/lib/libtarfile.tex python/trunk/Lib/tarfile.py python/trunk/Lib/test/test_tarfile.py python/trunk/Misc/NEWS Log: Added exclude keyword argument to the TarFile.add() method. Modified: python/trunk/Doc/lib/libtarfile.tex ============================================================================== --- python/trunk/Doc/lib/libtarfile.tex (original) +++ python/trunk/Doc/lib/libtarfile.tex Mon Jun 18 13:42:11 2007 @@ -314,13 +314,16 @@ \end{notice} \end{methoddesc} -\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive}}} +\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive\optional{, exclude}}}} Add the file \var{name} to the archive. \var{name} may be any type of file (directory, fifo, symbolic link, etc.). If given, \var{arcname} specifies an alternative name for the file in the archive. Directories are added recursively by default. - This can be avoided by setting \var{recursive} to \constant{False}; - the default is \constant{True}. + This can be avoided by setting \var{recursive} to \constant{False}. + If \var{exclude} is given it must be a function that takes one filename + argument and returns a boolean value. Depending on this value the + respective file is either excluded (\constant{True}) or added + (\constant{False}). \end{methoddesc} \begin{methoddesc}{addfile}{tarinfo\optional{, fileobj}} Modified: python/trunk/Lib/tarfile.py ============================================================================== --- python/trunk/Lib/tarfile.py (original) +++ python/trunk/Lib/tarfile.py Mon Jun 18 13:42:11 2007 @@ -1923,18 +1923,24 @@ print "link to", tarinfo.linkname, print - def add(self, name, arcname=None, recursive=True): + def add(self, name, arcname=None, recursive=True, exclude=None): """Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by - setting `recursive' to False. + setting `recursive' to False. `exclude' is a function that should + return True for each filename to be excluded. """ self._check("aw") if arcname is None: arcname = name + # Exclude pathnames. + if exclude is not None and exclude(name): + self._dbg(2, "tarfile: Excluded %r" % name) + return + # Skip if somebody tries to archive the archive... if self.name is not None and os.path.abspath(name) == self.name: self._dbg(2, "tarfile: Skipped %r" % name) @@ -1947,7 +1953,7 @@ if arcname == ".": arcname = "" for f in os.listdir(name): - self.add(f, os.path.join(arcname, f)) + self.add(f, os.path.join(arcname, f), recursive, exclude) return self._dbg(1, name) @@ -1969,7 +1975,7 @@ self.addfile(tarinfo) if recursive: for f in os.listdir(name): - self.add(os.path.join(name, f), os.path.join(arcname, f)) + self.add(os.path.join(name, f), os.path.join(arcname, f), recursive, exclude) else: self.addfile(tarinfo) Modified: python/trunk/Lib/test/test_tarfile.py ============================================================================== --- python/trunk/Lib/test/test_tarfile.py (original) +++ python/trunk/Lib/test/test_tarfile.py Mon Jun 18 13:42:11 2007 @@ -558,6 +558,27 @@ os.chdir(cwd) self.assert_(tar.getnames() == [], "added the archive to itself") + def test_exclude(self): + tempdir = os.path.join(TEMPDIR, "exclude") + os.mkdir(tempdir) + try: + for name in ("foo", "bar", "baz"): + name = os.path.join(tempdir, name) + open(name, "wb").close() + + def exclude(name): + return os.path.isfile(name) + + tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1") + tar.add(tempdir, arcname="empty_dir", exclude=exclude) + tar.close() + + tar = tarfile.open(tmpname, "r") + self.assertEqual(len(tar.getmembers()), 1) + self.assertEqual(tar.getnames()[0], "empty_dir") + finally: + shutil.rmtree(tempdir) + class StreamWriteTest(unittest.TestCase): Modified: python/trunk/Misc/NEWS ============================================================================== --- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Mon Jun 18 13:42:11 2007 @@ -231,6 +231,8 @@ Library ------- +- tarfile.py: Added "exclude" keyword argument to TarFile.add(). + - Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute. - The urlopen function of urllib2 now has an optional timeout parameter (note From g.brandl at gmx.net Mon Jun 18 17:16:47 2007 From: g.brandl at gmx.net (Georg Brandl) Date: Mon, 18 Jun 2007 17:16:47 +0200 Subject: [Python-checkins] r56019 - in python/trunk: Doc/lib/libtarfile.tex Lib/tarfile.py Lib/test/test_tarfile.py Misc/NEWS In-Reply-To: <20070618114216.100351E4006@bag.python.org> References: <20070618114216.100351E4006@bag.python.org> Message-ID: lars.gustaebel schrieb: > Author: lars.gustaebel > Date: Mon Jun 18 13:42:11 2007 > New Revision: 56019 > > Modified: > python/trunk/Doc/lib/libtarfile.tex > python/trunk/Lib/tarfile.py > python/trunk/Lib/test/test_tarfile.py > python/trunk/Misc/NEWS > Log: > Added exclude keyword argument to the TarFile.add() method. > > > Modified: python/trunk/Doc/lib/libtarfile.tex > ============================================================================== > --- python/trunk/Doc/lib/libtarfile.tex (original) > +++ python/trunk/Doc/lib/libtarfile.tex Mon Jun 18 13:42:11 2007 > @@ -314,13 +314,16 @@ > \end{notice} > \end{methoddesc} > > -\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive}}} > +\begin{methoddesc}{add}{name\optional{, arcname\optional{, recursive\optional{, exclude}}}} > Add the file \var{name} to the archive. \var{name} may be any type > of file (directory, fifo, symbolic link, etc.). > If given, \var{arcname} specifies an alternative name for the file in the > archive. Directories are added recursively by default. > - This can be avoided by setting \var{recursive} to \constant{False}; > - the default is \constant{True}. > + This can be avoided by setting \var{recursive} to \constant{False}. > + If \var{exclude} is given it must be a function that takes one filename > + argument and returns a boolean value. Depending on this value the > + respective file is either excluded (\constant{True}) or added > + (\constant{False}). > \end{methoddesc} This needs a \versionchanged entry for the new parameter. Georg From lars at gustaebel.de Mon Jun 18 21:49:57 2007 From: lars at gustaebel.de (Lars =?iso-8859-15?Q?Gust=E4bel?=) Date: Mon, 18 Jun 2007 21:49:57 +0200 Subject: [Python-checkins] r56019 - in python/trunk: Doc/lib/libtarfile.tex Lib/tarfile.py Lib/test/test_tarfile.py Misc/NEWS In-Reply-To: References: <20070618114216.100351E4006@bag.python.org> Message-ID: <20070618194957.GA26243@axis.g33x.de> On Mon, Jun 18, 2007 at 05:16:47PM +0200, Georg Brandl wrote: > This needs a \versionchanged entry for the new parameter. Yes, you're right, thanks! -- Lars Gust?bel lars at gustaebel.de Try to learn something about everything and everything about something. (Thomas H. Huxley) From python-checkins at python.org Mon Jun 18 22:05:58 2007 From: python-checkins at python.org (lars.gustaebel) Date: Mon, 18 Jun 2007 22:05:58 +0200 (CEST) Subject: [Python-checkins] r56023 - python/trunk/Doc/lib/libtarfile.tex Message-ID: <20070618200558.4A31E1E4006@bag.python.org> Author: lars.gustaebel Date: Mon Jun 18 22:05:55 2007 New Revision: 56023 Modified: python/trunk/Doc/lib/libtarfile.tex Log: Added missing \versionchanged tag for the new exclude parameter. Modified: python/trunk/Doc/lib/libtarfile.tex ============================================================================== --- python/trunk/Doc/lib/libtarfile.tex (original) +++ python/trunk/Doc/lib/libtarfile.tex Mon Jun 18 22:05:55 2007 @@ -324,6 +324,7 @@ argument and returns a boolean value. Depending on this value the respective file is either excluded (\constant{True}) or added (\constant{False}). + \versionchanged[Added the \var{exclude} parameter]{2.6} \end{methoddesc} \begin{methoddesc}{addfile}{tarinfo\optional{, fileobj}} From python-checkins at python.org Mon Jun 18 22:10:20 2007 From: python-checkins at python.org (senthil.kumaran) Date: Mon, 18 Jun 2007 22:10:20 +0200 (CEST) Subject: [Python-checkins] r56024 - sandbox/trunk/urilib Message-ID: <20070618201020.10C881E4006@bag.python.org> Author: senthil.kumaran Date: Mon Jun 18 22:10:19 2007 New Revision: 56024 Added: sandbox/trunk/urilib/ Log: Clean up urllib project, undertaken as a part of Google Summer of Code 2007 From python-checkins at python.org Mon Jun 18 22:21:47 2007 From: python-checkins at python.org (senthil.kumaran) Date: Mon, 18 Jun 2007 22:21:47 +0200 (CEST) Subject: [Python-checkins] r56025 - sandbox/trunk/urilib/cgi.py sandbox/trunk/urilib/test_urlparse.py sandbox/trunk/urilib/urlparse.py Message-ID: <20070618202147.AB5891E4006@bag.python.org> Author: senthil.kumaran Date: Mon Jun 18 22:21:14 2007 New Revision: 56025 Added: sandbox/trunk/urilib/cgi.py (contents, props changed) sandbox/trunk/urilib/test_urlparse.py (contents, props changed) sandbox/trunk/urilib/urlparse.py (contents, props changed) Log: urlparse module provide parse_qs and parse_qsl. cgi methods for same now call urlparse.parsed query also available at instance of urlparse object.test_urlparse updated with 3 uncertain tests commented. Added: sandbox/trunk/urilib/cgi.py ============================================================================== --- (empty file) +++ sandbox/trunk/urilib/cgi.py Mon Jun 18 22:21:14 2007 @@ -0,0 +1,1055 @@ +#! /usr/local/bin/python + +# NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is +# intentionally NOT "/usr/bin/env python". On many systems +# (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI +# scripts, and /usr/local/bin is the default directory where Python is +# installed, so /usr/bin/env would be unable to find python. Granted, +# binary installations by Linux vendors often install Python in +# /usr/bin. So let those vendors patch cgi.py to match their choice +# of installation. + +"""Support module for CGI (Common Gateway Interface) scripts. + +This module defines a number of utilities for use by CGI scripts +written in Python. +""" + +# XXX Perhaps there should be a slimmed version that doesn't contain +# all those backwards compatible and debugging classes and functions? + +# History +# ------- +# +# Michael McLay started this module. Steve Majewski changed the +# interface to SvFormContentDict and FormContentDict. The multipart +# parsing was inspired by code submitted by Andreas Paepcke. Guido van +# Rossum rewrote, reformatted and documented the module and is currently +# responsible for its maintenance. +# + +__version__ = "2.6" + + +# Imports +# ======= + +from operator import attrgetter +import sys +import os +import urllib +import urlparse +import mimetools +import rfc822 +import UserDict +try: + from cStringIO import StringIO +except ImportError: + from StringIO import StringIO + +__all__ = ["MiniFieldStorage", "FieldStorage", "FormContentDict", + "SvFormContentDict", "InterpFormContentDict", "FormContent", + "parse", "parse_qs", "parse_qsl", "parse_multipart", + "parse_header", "print_exception", "print_environ", + "print_form", "print_directory", "print_arguments", + "print_environ_usage", "escape"] + +# Logging support +# =============== + +logfile = "" # Filename to log to, if not empty +logfp = None # File object to log to, if not None + +def initlog(*allargs): + """Write a log message, if there is a log file. + + Even though this function is called initlog(), you should always + use log(); log is a variable that is set either to initlog + (initially), to dolog (once the log file has been opened), or to + nolog (when logging is disabled). + + The first argument is a format string; the remaining arguments (if + any) are arguments to the % operator, so e.g. + log("%s: %s", "a", "b") + will write "a: b" to the log file, followed by a newline. + + If the global logfp is not None, it should be a file object to + which log data is written. + + If the global logfp is None, the global logfile may be a string + giving a filename to open, in append mode. This file should be + world writable!!! If the file can't be opened, logging is + silently disabled (since there is no safe place where we could + send an error message). + + """ + global logfp, log + if logfile and not logfp: + try: + logfp = open(logfile, "a") + except IOError: + pass + if not logfp: + log = nolog + else: + log = dolog + log(*allargs) + +def dolog(fmt, *args): + """Write a log message to the log file. See initlog() for docs.""" + logfp.write(fmt%args + "\n") + +def nolog(*allargs): + """Dummy function, assigned to log when logging is disabled.""" + pass + +log = initlog # The current logging function + + +# Parsing functions +# ================= + +# Maximum input we will accept when REQUEST_METHOD is POST +# 0 ==> unlimited input +maxlen = 0 + +def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0): + """Parse a query in the environment or from a file (default stdin) + + Arguments, all optional: + + fp : file pointer; default: sys.stdin + + environ : environment dictionary; default: os.environ + + keep_blank_values: flag indicating whether blank values in + URL encoded forms should be treated as blank strings. + A true value indicates that blanks should be retained as + blank strings. The default false value indicates that + blank values are to be ignored and treated as if they were + not included. + + strict_parsing: flag indicating what to do with parsing errors. + If false (the default), errors are silently ignored. + If true, errors raise a ValueError exception. + """ + if fp is None: + fp = sys.stdin + if not 'REQUEST_METHOD' in environ: + environ['REQUEST_METHOD'] = 'GET' # For testing stand-alone + if environ['REQUEST_METHOD'] == 'POST': + ctype, pdict = parse_header(environ['CONTENT_TYPE']) + if ctype == 'multipart/form-data': + return parse_multipart(fp, pdict) + elif ctype == 'application/x-www-form-urlencoded': + clength = int(environ['CONTENT_LENGTH']) + if maxlen and clength > maxlen: + raise ValueError, 'Maximum content length exceeded' + qs = fp.read(clength) + else: + qs = '' # Unknown content-type + if 'QUERY_STRING' in environ: + if qs: qs = qs + '&' + qs = qs + environ['QUERY_STRING'] + elif sys.argv[1:]: + if qs: qs = qs + '&' + qs = qs + sys.argv[1] + environ['QUERY_STRING'] = qs # XXX Shouldn't, really + elif 'QUERY_STRING' in environ: + qs = environ['QUERY_STRING'] + else: + if sys.argv[1:]: + qs = sys.argv[1] + else: + qs = "" + environ['QUERY_STRING'] = qs # XXX Shouldn't, really + return parse_qs(qs, keep_blank_values, strict_parsing) + + +def parse_qs(qs, keep_blank_values=0, strict_parsing=0): + """Parse a query given as a string argument. + + Arguments: + + qs: URL-encoded query string to be parsed + + keep_blank_values: flag indicating whether blank values in + URL encoded queries should be treated as blank strings. + A true value indicates that blanks should be retained as + blank strings. The default false value indicates that + blank values are to be ignored and treated as if they were + not included. + + strict_parsing: flag indicating what to do with parsing errors. + If false (the default), errors are silently ignored. + If true, errors raise a ValueError exception. + + The functionality has been moved to urlparse and this invokes the + corresponding method from urlparse. + """ + return urlparse.parse_qs(qs, keep_blank_values, strict_parsing) + +def parse_qsl(qs, keep_blank_values=0, strict_parsing=0): + """Parse a query given as a string argument. + + Arguments: + + qs: URL-encoded query string to be parsed + + keep_blank_values: flag indicating whether blank values in + URL encoded queries should be treated as blank strings. A + true value indicates that blanks should be retained as blank + strings. The default false value indicates that blank values + are to be ignored and treated as if they were not included. + + strict_parsing: flag indicating what to do with parsing errors. If + false (the default), errors are silently ignored. If true, + errors raise a ValueError exception. + + Returns a list, as G-d intended. + + The functionality has been moved to urlparse and this invokes the + corresponding method from urlparse. + """ + return urlparse.parse_qsl(qs, keep_blank_values, strict_parsing) + + +def parse_multipart(fp, pdict): + """Parse multipart input. + + Arguments: + fp : input file + pdict: dictionary containing other parameters of content-type header + + Returns a dictionary just like parse_qs(): keys are the field names, each + value is a list of values for that field. This is easy to use but not + much good if you are expecting megabytes to be uploaded -- in that case, + use the FieldStorage class instead which is much more flexible. Note + that content-type is the raw, unparsed contents of the content-type + header. + + XXX This does not parse nested multipart parts -- use FieldStorage for + that. + + XXX This should really be subsumed by FieldStorage altogether -- no + point in having two implementations of the same parsing algorithm. + Also, FieldStorage protects itself better against certain DoS attacks + by limiting the size of the data read in one chunk. The API here + does not support that kind of protection. This also affects parse() + since it can call parse_multipart(). + + """ + boundary = "" + if 'boundary' in pdict: + boundary = pdict['boundary'] + if not valid_boundary(boundary): + raise ValueError, ('Invalid boundary in multipart form: %r' + % (boundary,)) + + nextpart = "--" + boundary + lastpart = "--" + boundary + "--" + partdict = {} + terminator = "" + + while terminator != lastpart: + bytes = -1 + data = None + if terminator: + # At start of next part. Read headers first. + headers = mimetools.Message(fp) + clength = headers.getheader('content-length') + if clength: + try: + bytes = int(clength) + except ValueError: + pass + if bytes > 0: + if maxlen and bytes > maxlen: + raise ValueError, 'Maximum content length exceeded' + data = fp.read(bytes) + else: + data = "" + # Read lines until end of part. + lines = [] + while 1: + line = fp.readline() + if not line: + terminator = lastpart # End outer loop + break + if line[:2] == "--": + terminator = line.strip() + if terminator in (nextpart, lastpart): + break + lines.append(line) + # Done with part. + if data is None: + continue + if bytes < 0: + if lines: + # Strip final line terminator + line = lines[-1] + if line[-2:] == "\r\n": + line = line[:-2] + elif line[-1:] == "\n": + line = line[:-1] + lines[-1] = line + data = "".join(lines) + line = headers['content-disposition'] + if not line: + continue + key, params = parse_header(line) + if key != 'form-data': + continue + if 'name' in params: + name = params['name'] + else: + continue + if name in partdict: + partdict[name].append(data) + else: + partdict[name] = [data] + + return partdict + + +def parse_header(line): + """Parse a Content-type like header. + + Return the main content-type and a dictionary of options. + + """ + plist = [x.strip() for x in line.split(';')] + key = plist.pop(0).lower() + pdict = {} + for p in plist: + i = p.find('=') + if i >= 0: + name = p[:i].strip().lower() + value = p[i+1:].strip() + if len(value) >= 2 and value[0] == value[-1] == '"': + value = value[1:-1] + value = value.replace('\\\\', '\\').replace('\\"', '"') + pdict[name] = value + return key, pdict + + +# Classes for field storage +# ========================= + +class MiniFieldStorage: + + """Like FieldStorage, for use when no file uploads are possible.""" + + # Dummy attributes + filename = None + list = None + type = None + file = None + type_options = {} + disposition = None + disposition_options = {} + headers = {} + + def __init__(self, name, value): + """Constructor from field name and value.""" + self.name = name + self.value = value + # self.file = StringIO(value) + + def __repr__(self): + """Return printable representation.""" + return "MiniFieldStorage(%r, %r)" % (self.name, self.value) + + +class FieldStorage: + + """Store a sequence of fields, reading multipart/form-data. + + This class provides naming, typing, files stored on disk, and + more. At the top level, it is accessible like a dictionary, whose + keys are the field names. (Note: None can occur as a field name.) + The items are either a Python list (if there's multiple values) or + another FieldStorage or MiniFieldStorage object. If it's a single + object, it has the following attributes: + + name: the field name, if specified; otherwise None + + filename: the filename, if specified; otherwise None; this is the + client side filename, *not* the file name on which it is + stored (that's a temporary file you don't deal with) + + value: the value as a *string*; for file uploads, this + transparently reads the file every time you request the value + + file: the file(-like) object from which you can read the data; + None if the data is stored a simple string + + type: the content-type, or None if not specified + + type_options: dictionary of options specified on the content-type + line + + disposition: content-disposition, or None if not specified + + disposition_options: dictionary of corresponding options + + headers: a dictionary(-like) object (sometimes rfc822.Message or a + subclass thereof) containing *all* headers + + The class is subclassable, mostly for the purpose of overriding + the make_file() method, which is called internally to come up with + a file open for reading and writing. This makes it possible to + override the default choice of storing all files in a temporary + directory and unlinking them as soon as they have been opened. + + """ + + def __init__(self, fp=None, headers=None, outerboundary="", + environ=os.environ, keep_blank_values=0, strict_parsing=0): + """Constructor. Read multipart/* until last part. + + Arguments, all optional: + + fp : file pointer; default: sys.stdin + (not used when the request method is GET) + + headers : header dictionary-like object; default: + taken from environ as per CGI spec + + outerboundary : terminating multipart boundary + (for internal use only) + + environ : environment dictionary; default: os.environ + + keep_blank_values: flag indicating whether blank values in + URL encoded forms should be treated as blank strings. + A true value indicates that blanks should be retained as + blank strings. The default false value indicates that + blank values are to be ignored and treated as if they were + not included. + + strict_parsing: flag indicating what to do with parsing errors. + If false (the default), errors are silently ignored. + If true, errors raise a ValueError exception. + + """ + method = 'GET' + self.keep_blank_values = keep_blank_values + self.strict_parsing = strict_parsing + if 'REQUEST_METHOD' in environ: + method = environ['REQUEST_METHOD'].upper() + if method == 'GET' or method == 'HEAD': + if 'QUERY_STRING' in environ: + qs = environ['QUERY_STRING'] + elif sys.argv[1:]: + qs = sys.argv[1] + else: + qs = "" + fp = StringIO(qs) + if headers is None: + headers = {'content-type': + "application/x-www-form-urlencoded"} + if headers is None: + headers = {} + if method == 'POST': + # Set default content-type for POST to what's traditional + headers['content-type'] = "application/x-www-form-urlencoded" + if 'CONTENT_TYPE' in environ: + headers['content-type'] = environ['CONTENT_TYPE'] + if 'CONTENT_LENGTH' in environ: + headers['content-length'] = environ['CONTENT_LENGTH'] + self.fp = fp or sys.stdin + self.headers = headers + self.outerboundary = outerboundary + + # Process content-disposition header + cdisp, pdict = "", {} + if 'content-disposition' in self.headers: + cdisp, pdict = parse_header(self.headers['content-disposition']) + self.disposition = cdisp + self.disposition_options = pdict + self.name = None + if 'name' in pdict: + self.name = pdict['name'] + self.filename = None + if 'filename' in pdict: + self.filename = pdict['filename'] + + # Process content-type header + # + # Honor any existing content-type header. But if there is no + # content-type header, use some sensible defaults. Assume + # outerboundary is "" at the outer level, but something non-false + # inside a multi-part. The default for an inner part is text/plain, + # but for an outer part it should be urlencoded. This should catch + # bogus clients which erroneously forget to include a content-type + # header. + # + # See below for what we do if there does exist a content-type header, + # but it happens to be something we don't understand. + if 'content-type' in self.headers: + ctype, pdict = parse_header(self.headers['content-type']) + elif self.outerboundary or method != 'POST': + ctype, pdict = "text/plain", {} + else: + ctype, pdict = 'application/x-www-form-urlencoded', {} + self.type = ctype + self.type_options = pdict + self.innerboundary = "" + if 'boundary' in pdict: + self.innerboundary = pdict['boundary'] + clen = -1 + if 'content-length' in self.headers: + try: + clen = int(self.headers['content-length']) + except ValueError: + pass + if maxlen and clen > maxlen: + raise ValueError, 'Maximum content length exceeded' + self.length = clen + + self.list = self.file = None + self.done = 0 + if ctype == 'application/x-www-form-urlencoded': + self.read_urlencoded() + elif ctype[:10] == 'multipart/': + self.read_multi(environ, keep_blank_values, strict_parsing) + else: + self.read_single() + + def __repr__(self): + """Return a printable representation.""" + return "FieldStorage(%r, %r, %r)" % ( + self.name, self.filename, self.value) + + def __iter__(self): + return iter(self.keys()) + + def __getattr__(self, name): + if name != 'value': + raise AttributeError, name + if self.file: + self.file.seek(0) + value = self.file.read() + self.file.seek(0) + elif self.list is not None: + value = self.list + else: + value = None + return value + + def __getitem__(self, key): + """Dictionary style indexing.""" + if self.list is None: + raise TypeError, "not indexable" + found = [] + for item in self.list: + if item.name == key: found.append(item) + if not found: + raise KeyError, key + if len(found) == 1: + return found[0] + else: + return found + + def getvalue(self, key, default=None): + """Dictionary style get() method, including 'value' lookup.""" + if key in self: + value = self[key] + if type(value) is type([]): + return map(attrgetter('value'), value) + else: + return value.value + else: + return default + + def getfirst(self, key, default=None): + """ Return the first value received.""" + if key in self: + value = self[key] + if type(value) is type([]): + return value[0].value + else: + return value.value + else: + return default + + def getlist(self, key): + """ Return list of received values.""" + if key in self: + value = self[key] + if type(value) is type([]): + return map(attrgetter('value'), value) + else: + return [value.value] + else: + return [] + + def keys(self): + """Dictionary style keys() method.""" + if self.list is None: + raise TypeError, "not indexable" + keys = [] + for item in self.list: + if item.name not in keys: keys.append(item.name) + return keys + + def has_key(self, key): + """Dictionary style has_key() method.""" + if self.list is None: + raise TypeError, "not indexable" + for item in self.list: + if item.name == key: return True + return False + + def __contains__(self, key): + """Dictionary style __contains__ method.""" + if self.list is None: + raise TypeError, "not indexable" + for item in self.list: + if item.name == key: return True + return False + + def __len__(self): + """Dictionary style len(x) support.""" + return len(self.keys()) + + def read_urlencoded(self): + """Internal: read data in query string format.""" + qs = self.fp.read(self.length) + self.list = list = [] + for key, value in parse_qsl(qs, self.keep_blank_values, + self.strict_parsing): + list.append(MiniFieldStorage(key, value)) + self.skip_lines() + + FieldStorageClass = None + + def read_multi(self, environ, keep_blank_values, strict_parsing): + """Internal: read a part that is itself multipart.""" + ib = self.innerboundary + if not valid_boundary(ib): + raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,) + self.list = [] + klass = self.FieldStorageClass or self.__class__ + part = klass(self.fp, {}, ib, + environ, keep_blank_values, strict_parsing) + # Throw first part away + while not part.done: + headers = rfc822.Message(self.fp) + part = klass(self.fp, headers, ib, + environ, keep_blank_values, strict_parsing) + self.list.append(part) + self.skip_lines() + + def read_single(self): + """Internal: read an atomic part.""" + if self.length >= 0: + self.read_binary() + self.skip_lines() + else: + self.read_lines() + self.file.seek(0) + + bufsize = 8*1024 # I/O buffering size for copy to file + + def read_binary(self): + """Internal: read binary data.""" + self.file = self.make_file('b') + todo = self.length + if todo >= 0: + while todo > 0: + data = self.fp.read(min(todo, self.bufsize)) + if not data: + self.done = -1 + break + self.file.write(data) + todo = todo - len(data) + + def read_lines(self): + """Internal: read lines until EOF or outerboundary.""" + self.file = self.__file = StringIO() + if self.outerboundary: + self.read_lines_to_outerboundary() + else: + self.read_lines_to_eof() + + def __write(self, line): + if self.__file is not None: + if self.__file.tell() + len(line) > 1000: + self.file = self.make_file('') + self.file.write(self.__file.getvalue()) + self.__file = None + self.file.write(line) + + def read_lines_to_eof(self): + """Internal: read lines until EOF.""" + while 1: + line = self.fp.readline(1<<16) + if not line: + self.done = -1 + break + self.__write(line) + + def read_lines_to_outerboundary(self): + """Internal: read lines until outerboundary.""" + next = "--" + self.outerboundary + last = next + "--" + delim = "" + last_line_lfend = True + while 1: + line = self.fp.readline(1<<16) + if not line: + self.done = -1 + break + if line[:2] == "--" and last_line_lfend: + strippedline = line.strip() + if strippedline == next: + break + if strippedline == last: + self.done = 1 + break + odelim = delim + if line[-2:] == "\r\n": + delim = "\r\n" + line = line[:-2] + last_line_lfend = True + elif line[-1] == "\n": + delim = "\n" + line = line[:-1] + last_line_lfend = True + else: + delim = "" + last_line_lfend = False + self.__write(odelim + line) + + def skip_lines(self): + """Internal: skip lines until outer boundary if defined.""" + if not self.outerboundary or self.done: + return + next = "--" + self.outerboundary + last = next + "--" + last_line_lfend = True + while 1: + line = self.fp.readline(1<<16) + if not line: + self.done = -1 + break + if line[:2] == "--" and last_line_lfend: + strippedline = line.strip() + if strippedline == next: + break + if strippedline == last: + self.done = 1 + break + last_line_lfend = line.endswith('\n') + + def make_file(self, binary=None): + """Overridable: return a readable & writable file. + + The file will be used as follows: + - data is written to it + - seek(0) + - data is read from it + + The 'binary' argument is unused -- the file is always opened + in binary mode. + + This version opens a temporary file for reading and writing, + and immediately deletes (unlinks) it. The trick (on Unix!) is + that the file can still be used, but it can't be opened by + another process, and it will automatically be deleted when it + is closed or when the current process terminates. + + If you want a more permanent file, you derive a class which + overrides this method. If you want a visible temporary file + that is nevertheless automatically deleted when the script + terminates, try defining a __del__ method in a derived class + which unlinks the temporary files you have created. + + """ + import tempfile + return tempfile.TemporaryFile("w+b") + + + +# Backwards Compatibility Classes +# =============================== + +class FormContentDict(UserDict.UserDict): + """Form content as dictionary with a list of values per field. + + form = FormContentDict() + + form[key] -> [value, value, ...] + key in form -> Boolean + form.keys() -> [key, key, ...] + form.values() -> [[val, val, ...], [val, val, ...], ...] + form.items() -> [(key, [val, val, ...]), (key, [val, val, ...]), ...] + form.dict == {key: [val, val, ...], ...} + + """ + def __init__(self, environ=os.environ, keep_blank_values=0, strict_parsing=0): + self.dict = self.data = parse(environ=environ, + keep_blank_values=keep_blank_values, + strict_parsing=strict_parsing) + self.query_string = environ['QUERY_STRING'] + + +class SvFormContentDict(FormContentDict): + """Form content as dictionary expecting a single value per field. + + If you only expect a single value for each field, then form[key] + will return that single value. It will raise an IndexError if + that expectation is not true. If you expect a field to have + possible multiple values, than you can use form.getlist(key) to + get all of the values. values() and items() are a compromise: + they return single strings where there is a single value, and + lists of strings otherwise. + + """ + def __getitem__(self, key): + if len(self.dict[key]) > 1: + raise IndexError, 'expecting a single value' + return self.dict[key][0] + def getlist(self, key): + return self.dict[key] + def values(self): + result = [] + for value in self.dict.values(): + if len(value) == 1: + result.append(value[0]) + else: result.append(value) + return result + def items(self): + result = [] + for key, value in self.dict.items(): + if len(value) == 1: + result.append((key, value[0])) + else: result.append((key, value)) + return result + + +class InterpFormContentDict(SvFormContentDict): + """This class is present for backwards compatibility only.""" + def __getitem__(self, key): + v = SvFormContentDict.__getitem__(self, key) + if v[0] in '0123456789+-.': + try: return int(v) + except ValueError: + try: return float(v) + except ValueError: pass + return v.strip() + def values(self): + result = [] + for key in self.keys(): + try: + result.append(self[key]) + except IndexError: + result.append(self.dict[key]) + return result + def items(self): + result = [] + for key in self.keys(): + try: + result.append((key, self[key])) + except IndexError: + result.append((key, self.dict[key])) + return result + + +class FormContent(FormContentDict): + """This class is present for backwards compatibility only.""" + def values(self, key): + if key in self.dict :return self.dict[key] + else: return None + def indexed_value(self, key, location): + if key in self.dict: + if len(self.dict[key]) > location: + return self.dict[key][location] + else: return None + else: return None + def value(self, key): + if key in self.dict: return self.dict[key][0] + else: return None + def length(self, key): + return len(self.dict[key]) + def stripped(self, key): + if key in self.dict: return self.dict[key][0].strip() + else: return None + def pars(self): + return self.dict + + +# Test/debug code +# =============== + +def test(environ=os.environ): + """Robust test CGI script, usable as main program. + + Write minimal HTTP headers and dump all information provided to + the script in HTML form. + + """ + print "Content-type: text/html" + print + sys.stderr = sys.stdout + try: + form = FieldStorage() # Replace with other classes to test those + print_directory() + print_arguments() + print_form(form) + print_environ(environ) + print_environ_usage() + def f(): + exec "testing print_exception() -- italics?" + def g(f=f): + f() + print "

What follows is a test, not an actual exception:

" + g() + except: + print_exception() + + print "

Second try with a small maxlen...

" + + global maxlen + maxlen = 50 + try: + form = FieldStorage() # Replace with other classes to test those + print_directory() + print_arguments() + print_form(form) + print_environ(environ) + except: + print_exception() + +def print_exception(type=None, value=None, tb=None, limit=None): + if type is None: + type, value, tb = sys.exc_info() + import traceback + print + print "

Traceback (most recent call last):

" + list = traceback.format_tb(tb, limit) + \ + traceback.format_exception_only(type, value) + print "
%s%s
" % ( + escape("".join(list[:-1])), + escape(list[-1]), + ) + del tb + +def print_environ(environ=os.environ): + """Dump the shell environment as HTML.""" + keys = environ.keys() + keys.sort() + print + print "

Shell Environment:

" + print "
" + for key in keys: + print "
", escape(key), "
", escape(environ[key]) + print "
" + print + +def print_form(form): + """Dump the contents of a form as HTML.""" + keys = form.keys() + keys.sort() + print + print "

Form Contents:

" + if not keys: + print "

No form fields." + print "

" + for key in keys: + print "
" + escape(key) + ":", + value = form[key] + print "" + escape(repr(type(value))) + "" + print "
" + escape(repr(value)) + print "
" + print + +def print_directory(): + """Dump the current directory as HTML.""" + print + print "

Current Working Directory:

" + try: + pwd = os.getcwd() + except os.error, msg: + print "os.error:", escape(str(msg)) + else: + print escape(pwd) + print + +def print_arguments(): + print + print "

Command Line Arguments:

" + print + print sys.argv + print + +def print_environ_usage(): + """Dump a list of environment variables used by CGI as HTML.""" + print """ +

These environment variables could have been set:

+
    +
  • AUTH_TYPE +
  • CONTENT_LENGTH +
  • CONTENT_TYPE +
  • DATE_GMT +
  • DATE_LOCAL +
  • DOCUMENT_NAME +
  • DOCUMENT_ROOT +
  • DOCUMENT_URI +
  • GATEWAY_INTERFACE +
  • LAST_MODIFIED +
  • PATH +
  • PATH_INFO +
  • PATH_TRANSLATED +
  • QUERY_STRING +
  • REMOTE_ADDR +
  • REMOTE_HOST +
  • REMOTE_IDENT +
  • REMOTE_USER +
  • REQUEST_METHOD +
  • SCRIPT_NAME +
  • SERVER_NAME +
  • SERVER_PORT +
  • SERVER_PROTOCOL +
  • SERVER_ROOT +
  • SERVER_SOFTWARE +
+In addition, HTTP headers sent by the server may be passed in the +environment as well. Here are some common variable names: +
    +
  • HTTP_ACCEPT +
  • HTTP_CONNECTION +
  • HTTP_HOST +
  • HTTP_PRAGMA +
  • HTTP_REFERER +
  • HTTP_USER_AGENT +
+""" + + +# Utilities +# ========= + +def escape(s, quote=None): + '''Replace special characters "&", "<" and ">" to HTML-safe sequences. + If the optional flag quote is true, the quotation mark character (") + is also translated.''' + s = s.replace("&", "&") # Must be done first! + s = s.replace("<", "<") + s = s.replace(">", ">") + if quote: + s = s.replace('"', """) + return s + +def valid_boundary(s, _vb_pattern="^[ -~]{0,200}[!-~]$"): + import re + return re.match(_vb_pattern, s) + +# Invoke mainline +# =============== + +# Call test() when this file is run as a script (not imported as a module) +if __name__ == '__main__': + test() Added: sandbox/trunk/urilib/test_urlparse.py ============================================================================== --- (empty file) +++ sandbox/trunk/urilib/test_urlparse.py Mon Jun 18 22:21:14 2007 @@ -0,0 +1,395 @@ +#! /usr/bin/env python + +from test import test_support +import unittest +import urlparse + +RFC1808_BASE = "http://a/b/c/d;p?q#f" +RFC2396_BASE = "http://a/b/c/d;p?q" + +class ComparableException: + def __init__(self, err): + self.err = err + + def __str__(self): + return str(self.err) + + def __cmp__(self, anExc): + if not isinstance(anExc, Exception): + return -1 + x = cmp(self.err.__class__, anExc.__class__) + if x != 0: + return x + return cmp(self.err.args, anExc.args) + + def __getattr__(self, attr): + return getattr(self.err, attr) + +def do_test(query): + try: + return urlparse.parse_qsl(query, keep_blank_values=1, strict_parsing=1) + except StandardError, err: + return ComparableException(err) + +class UrlParseTestCase(unittest.TestCase): + + def checkRoundtrips(self, url, parsed, split): + result = urlparse.urlparse(url) + self.assertEqual(result, parsed) + t = (result.scheme, result.netloc, result.path, + result.params, result.query, result.fragment) + self.assertEqual(t, parsed) + # put it back together and it should be the same + result2 = urlparse.urlunparse(result) + self.assertEqual(result2, url) + self.assertEqual(result2, result.geturl()) + + # the result of geturl() is a fixpoint; we can always parse it + # again to get the same result: + result3 = urlparse.urlparse(result.geturl()) + self.assertEqual(result3.geturl(), result.geturl()) + self.assertEqual(result3, result) + self.assertEqual(result3.scheme, result.scheme) + self.assertEqual(result3.netloc, result.netloc) + self.assertEqual(result3.path, result.path) + self.assertEqual(result3.params, result.params) + self.assertEqual(result3.query, result.query) + self.assertEqual(result3.fragment, result.fragment) + self.assertEqual(result3.username, result.username) + self.assertEqual(result3.password, result.password) + self.assertEqual(result3.hostname, result.hostname) + self.assertEqual(result3.port, result.port) + + # check the roundtrip using urlsplit() as well + result = urlparse.urlsplit(url) + self.assertEqual(result, split) + t = (result.scheme, result.netloc, result.path, + result.query, result.fragment) + self.assertEqual(t, split) + result2 = urlparse.urlunsplit(result) + self.assertEqual(result2, url) + self.assertEqual(result2, result.geturl()) + + # check the fixpoint property of re-parsing the result of geturl() + result3 = urlparse.urlsplit(result.geturl()) + self.assertEqual(result3.geturl(), result.geturl()) + self.assertEqual(result3, result) + self.assertEqual(result3.scheme, result.scheme) + self.assertEqual(result3.netloc, result.netloc) + self.assertEqual(result3.path, result.path) + self.assertEqual(result3.query, result.query) + self.assertEqual(result3.fragment, result.fragment) + self.assertEqual(result3.username, result.username) + self.assertEqual(result3.password, result.password) + self.assertEqual(result3.hostname, result.hostname) + self.assertEqual(result3.port, result.port) + + def test_roundtrips(self): + testcases = [ + ('file:///tmp/junk.txt', + ('file', '', '/tmp/junk.txt', '', '', ''), + ('file', '', '/tmp/junk.txt', '', '')), + ('imap://mail.python.org/mbox1', + ('imap', 'mail.python.org', '/mbox1', '', '', ''), + ('imap', 'mail.python.org', '/mbox1', '', '')), + ('mms://wms.sys.hinet.net/cts/Drama/09006251100.asf', + ('mms', 'wms.sys.hinet.net', '/cts/Drama/09006251100.asf', + '', '', ''), + ('mms', 'wms.sys.hinet.net', '/cts/Drama/09006251100.asf', + '', '')), + ('svn+ssh://svn.zope.org/repos/main/ZConfig/trunk/', + ('svn+ssh', 'svn.zope.org', '/repos/main/ZConfig/trunk/', + '', '', ''), + ('svn+ssh', 'svn.zope.org', '/repos/main/ZConfig/trunk/', + '', '')) + ] + for url, parsed, split in testcases: + self.checkRoundtrips(url, parsed, split) + + def test_http_roundtrips(self): + # urlparse.urlsplit treats 'http:' as an optimized special case, + # so we test both 'http:' and 'https:' in all the following. + # Three cheers for white box knowledge! + testcases = [ + ('://www.python.org', + ('www.python.org', '', '', '', ''), + ('www.python.org', '', '', '')), + ('://www.python.org#abc', + ('www.python.org', '', '', '', 'abc'), + ('www.python.org', '', '', 'abc')), + ('://www.python.org?q=abc', + ('www.python.org', '', '', 'q=abc', ''), + ('www.python.org', '', 'q=abc', '')), + ('://www.python.org/#abc', + ('www.python.org', '/', '', '', 'abc'), + ('www.python.org', '/', '', 'abc')), + ('://a/b/c/d;p?q#f', + ('a', '/b/c/d', 'p', 'q', 'f'), + ('a', '/b/c/d;p', 'q', 'f')), + ] + for scheme in ('http', 'https'): + for url, parsed, split in testcases: + url = scheme + url + parsed = (scheme,) + parsed + split = (scheme,) + split + self.checkRoundtrips(url, parsed, split) + + def checkJoin(self, base, relurl, expected): + self.assertEqual(urlparse.urljoin(base, relurl), expected, + (base, relurl, expected)) + + def test_unparse_parse(self): + for u in ['Python', './Python']: + self.assertEqual(urlparse.urlunsplit(urlparse.urlsplit(u)), u) + self.assertEqual(urlparse.urlunparse(urlparse.urlparse(u)), u) + + def test_RFC1808(self): + # "normal" cases from RFC 1808: + self.checkJoin(RFC1808_BASE, 'g:h', 'g:h') + self.checkJoin(RFC1808_BASE, 'g', 'http://a/b/c/g') + self.checkJoin(RFC1808_BASE, './g', 'http://a/b/c/g') + self.checkJoin(RFC1808_BASE, 'g/', 'http://a/b/c/g/') + self.checkJoin(RFC1808_BASE, '/g', 'http://a/g') + self.checkJoin(RFC1808_BASE, '//g', 'http://g') + self.checkJoin(RFC1808_BASE, 'g?y', 'http://a/b/c/g?y') + self.checkJoin(RFC1808_BASE, 'g?y/./x', 'http://a/b/c/g?y/./x') + self.checkJoin(RFC1808_BASE, '#s', 'http://a/b/c/d;p?q#s') + self.checkJoin(RFC1808_BASE, 'g#s', 'http://a/b/c/g#s') + self.checkJoin(RFC1808_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x') + self.checkJoin(RFC1808_BASE, 'g?y#s', 'http://a/b/c/g?y#s') + self.checkJoin(RFC1808_BASE, 'g;x', 'http://a/b/c/g;x') + self.checkJoin(RFC1808_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s') + self.checkJoin(RFC1808_BASE, '.', 'http://a/b/c/') + self.checkJoin(RFC1808_BASE, './', 'http://a/b/c/') + self.checkJoin(RFC1808_BASE, '..', 'http://a/b/') + self.checkJoin(RFC1808_BASE, '../', 'http://a/b/') + self.checkJoin(RFC1808_BASE, '../g', 'http://a/b/g') + self.checkJoin(RFC1808_BASE, '../..', 'http://a/') + self.checkJoin(RFC1808_BASE, '../../', 'http://a/') + self.checkJoin(RFC1808_BASE, '../../g', 'http://a/g') + + # "abnormal" cases from RFC 1808: + self.checkJoin(RFC1808_BASE, '', 'http://a/b/c/d;p?q#f') + self.checkJoin(RFC1808_BASE, '../../../g', 'http://a/../g') + self.checkJoin(RFC1808_BASE, '../../../../g', 'http://a/../../g') + self.checkJoin(RFC1808_BASE, '/./g', 'http://a/./g') + self.checkJoin(RFC1808_BASE, '/../g', 'http://a/../g') + self.checkJoin(RFC1808_BASE, 'g.', 'http://a/b/c/g.') + self.checkJoin(RFC1808_BASE, '.g', 'http://a/b/c/.g') + self.checkJoin(RFC1808_BASE, 'g..', 'http://a/b/c/g..') + self.checkJoin(RFC1808_BASE, '..g', 'http://a/b/c/..g') + self.checkJoin(RFC1808_BASE, './../g', 'http://a/b/g') + self.checkJoin(RFC1808_BASE, './g/.', 'http://a/b/c/g/') + self.checkJoin(RFC1808_BASE, 'g/./h', 'http://a/b/c/g/h') + self.checkJoin(RFC1808_BASE, 'g/../h', 'http://a/b/c/h') + + # RFC 1808 and RFC 1630 disagree on these (according to RFC 1808), + # so we'll not actually run these tests (which expect 1808 behavior). + #self.checkJoin(RFC1808_BASE, 'http:g', 'http:g') + #self.checkJoin(RFC1808_BASE, 'http:', 'http:') + + def test_RFC2396(self): + # cases from RFC 2396 + + self.checkJoin(RFC2396_BASE, '?y', 'http://a/b/c/?y') + self.checkJoin(RFC2396_BASE, ';x', 'http://a/b/c/;x') + + self.checkJoin(RFC2396_BASE, 'g:h', 'g:h') + self.checkJoin(RFC2396_BASE, 'g', 'http://a/b/c/g') + self.checkJoin(RFC2396_BASE, './g', 'http://a/b/c/g') + self.checkJoin(RFC2396_BASE, 'g/', 'http://a/b/c/g/') + self.checkJoin(RFC2396_BASE, '/g', 'http://a/g') + self.checkJoin(RFC2396_BASE, '//g', 'http://g') + self.checkJoin(RFC2396_BASE, 'g?y', 'http://a/b/c/g?y') + self.checkJoin(RFC2396_BASE, '#s', 'http://a/b/c/d;p?q#s') + self.checkJoin(RFC2396_BASE, 'g#s', 'http://a/b/c/g#s') + self.checkJoin(RFC2396_BASE, 'g?y#s', 'http://a/b/c/g?y#s') + self.checkJoin(RFC2396_BASE, 'g;x', 'http://a/b/c/g;x') + self.checkJoin(RFC2396_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s') + self.checkJoin(RFC2396_BASE, '.', 'http://a/b/c/') + self.checkJoin(RFC2396_BASE, './', 'http://a/b/c/') + self.checkJoin(RFC2396_BASE, '..', 'http://a/b/') + self.checkJoin(RFC2396_BASE, '../', 'http://a/b/') + self.checkJoin(RFC2396_BASE, '../g', 'http://a/b/g') + self.checkJoin(RFC2396_BASE, '../..', 'http://a/') + self.checkJoin(RFC2396_BASE, '../../', 'http://a/') + self.checkJoin(RFC2396_BASE, '../../g', 'http://a/g') + self.checkJoin(RFC2396_BASE, '', RFC2396_BASE) + self.checkJoin(RFC2396_BASE, '../../../g', 'http://a/../g') + self.checkJoin(RFC2396_BASE, '../../../../g', 'http://a/../../g') + self.checkJoin(RFC2396_BASE, '/./g', 'http://a/./g') + self.checkJoin(RFC2396_BASE, '/../g', 'http://a/../g') + self.checkJoin(RFC2396_BASE, 'g.', 'http://a/b/c/g.') + self.checkJoin(RFC2396_BASE, '.g', 'http://a/b/c/.g') + self.checkJoin(RFC2396_BASE, 'g..', 'http://a/b/c/g..') + self.checkJoin(RFC2396_BASE, '..g', 'http://a/b/c/..g') + self.checkJoin(RFC2396_BASE, './../g', 'http://a/b/g') + self.checkJoin(RFC2396_BASE, './g/.', 'http://a/b/c/g/') + self.checkJoin(RFC2396_BASE, 'g/./h', 'http://a/b/c/g/h') + self.checkJoin(RFC2396_BASE, 'g/../h', 'http://a/b/c/h') + self.checkJoin(RFC2396_BASE, 'g;x=1/./y', 'http://a/b/c/g;x=1/y') + self.checkJoin(RFC2396_BASE, 'g;x=1/../y', 'http://a/b/c/y') + self.checkJoin(RFC2396_BASE, 'g?y/./x', 'http://a/b/c/g?y/./x') + self.checkJoin(RFC2396_BASE, 'g?y/../x', 'http://a/b/c/g?y/../x') + self.checkJoin(RFC2396_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x') + self.checkJoin(RFC2396_BASE, 'g#s/../x', 'http://a/b/c/g#s/../x') + + def test_urldefrag(self): + for url, defrag, frag in [ + ('http://python.org#frag', 'http://python.org', 'frag'), + ('http://python.org', 'http://python.org', ''), + ('http://python.org/#frag', 'http://python.org/', 'frag'), + ('http://python.org/', 'http://python.org/', ''), + ('http://python.org/?q#frag', 'http://python.org/?q', 'frag'), + ('http://python.org/?q', 'http://python.org/?q', ''), + ('http://python.org/p#frag', 'http://python.org/p', 'frag'), + ('http://python.org/p?q', 'http://python.org/p?q', ''), + (RFC1808_BASE, 'http://a/b/c/d;p?q', 'f'), + (RFC2396_BASE, 'http://a/b/c/d;p?q', ''), + ]: + self.assertEqual(urlparse.urldefrag(url), (defrag, frag)) + + def test_urlsplit_attributes(self): + url = "HTTP://WWW.PYTHON.ORG/doc/#frag" + p = urlparse.urlsplit(url) + self.assertEqual(p.scheme, "http") + self.assertEqual(p.netloc, "WWW.PYTHON.ORG") + self.assertEqual(p.path, "/doc/") + self.assertEqual(p.query, "") + self.assertEqual(p.fragment, "frag") + self.assertEqual(p.username, None) + self.assertEqual(p.password, None) + self.assertEqual(p.hostname, "www.python.org") + self.assertEqual(p.port, None) + # geturl() won't return exactly the original URL in this case + # since the scheme is always case-normalized + #self.assertEqual(p.geturl(), url) + + url = "http://User:Pass at www.python.org:080/doc/?query=yes#frag" + p = urlparse.urlsplit(url) + self.assertEqual(p.scheme, "http") + self.assertEqual(p.netloc, "User:Pass at www.python.org:080") + self.assertEqual(p.path, "/doc/") + self.assertEqual(p.query, "query=yes") + self.assertEqual(p.fragment, "frag") + self.assertEqual(p.username, "User") + self.assertEqual(p.password, "Pass") + self.assertEqual(p.hostname, "www.python.org") + self.assertEqual(p.port, 80) + self.assertEqual(p.geturl(), url) + + def test_attributes_bad_port(self): + """Check handling of non-integer ports.""" + p = urlparse.urlsplit("http://www.example.net:foo") + self.assertEqual(p.netloc, "www.example.net:foo") + self.assertRaises(ValueError, lambda: p.port) + + p = urlparse.urlparse("http://www.example.net:foo") + self.assertEqual(p.netloc, "www.example.net:foo") + self.assertRaises(ValueError, lambda: p.port) + + def test_attributes_without_netloc(self): + # This example is straight from RFC 3261. It looks like it + # should allow the username, hostname, and port to be filled + # in, but doesn't. Since it's a URI and doesn't use the + # scheme://netloc syntax, the netloc and related attributes + # should be left empty. + uri = "sip:alice at atlanta.com;maddr=239.255.255.1;ttl=15" + p = urlparse.urlsplit(uri) + self.assertEqual(p.netloc, "") + self.assertEqual(p.username, None) + self.assertEqual(p.password, None) + self.assertEqual(p.hostname, None) + self.assertEqual(p.port, None) + self.assertEqual(p.geturl(), uri) + + p = urlparse.urlparse(uri) + self.assertEqual(p.netloc, "") + self.assertEqual(p.username, None) + self.assertEqual(p.password, None) + self.assertEqual(p.hostname, None) + self.assertEqual(p.port, None) + self.assertEqual(p.geturl(), uri) + + def test_parsequery(self): + parse_qsl_test_cases = [ + ("", []), + ("&", []), + ("&&", []), + ("=", [('', '')]), + ("=a", [('', 'a')]), + ("a", [('a', '')]), + ("a=", [('a', '')]), + ("a=", [('a', '')]), + ("&a=b", [('a', 'b')]), + ("a=a+b&b=b+c", [('a', 'a b'), ('b', 'b c')]), + ("a=1&a=2", [('a', '1'), ('a', '2')]), + ] + + parse_strict_test_cases = [ + ("", ValueError("bad query field: ''")), + ("&", ValueError("bad query field: ''")), + ("&&", ValueError("bad query field: ''")), + (";", ValueError("bad query field: ''")), + (";&;", ValueError("bad query field: ''")), + # Should the next few really be valid? +# ("=", {}), +# ("=&=", {}), +# ("=;=", {}), + # This rest seem to make sense + ("=a", {'': ['a']}), + ("&=a", ValueError("bad query field: ''")), + ("=a&", ValueError("bad query field: ''")), + ("=&a", ValueError("bad query field: 'a'")), + ("b=a", {'b': ['a']}), + ("b+=a", {'b ': ['a']}), + ("a=b=a", {'a': ['b=a']}), + ("a=+b=a", {'a': [' b=a']}), + ("&b=a", ValueError("bad query field: ''")), + ("b&=a", ValueError("bad query field: 'b'")), + ("a=a+b&b=b+c", {'a': ['a b'], 'b': ['b c']}), + ("a=a+b&a=b+a", {'a': ['a b', 'b a']}), + ("x=1&y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}), + ("x=1;y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}), + ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}), + ("Hbc5161168c542333633315dee1182227:key_store_seqid=400006&cuyer=r&view=bustomer&order_id=0bb2e248638833d48cb7fed300000f1b&expire=964546263&lobale=en-US&kid=130003.300038&ss=env", + {'Hbc5161168c542333633315dee1182227:key_store_seqid': ['400006'], + 'cuyer': ['r'], + 'expire': ['964546263'], + 'kid': ['130003.300038'], + 'lobale': ['en-US'], + 'order_id': ['0bb2e248638833d48cb7fed300000f1b'], + 'ss': ['env'], + 'view': ['bustomer'], + }), + + ("group_id=5470&set=custom&_assigned_to=31392&_status=1&_category=100&SUBMIT=Browse", + {'SUBMIT': ['Browse'], + '_assigned_to': ['31392'], + '_category': ['100'], + '_status': ['1'], + 'group_id': ['5470'], + 'set': ['custom'], + }) + ] + + for orig, expect in parse_qsl_test_cases: + result = urlparse.parse_qsl(orig,keep_blank_values=True) + self.assertEqual(result, expect, "Error parsing %s" % repr(orig)) + + for orig, expect in parse_strict_test_cases: + if type(expect) == type({}): + result = urlparse.parse_qs(orig,keep_blank_values=True, + strict_parsing = True) + self.assertEqual(result, expect, "Error paring %s" % + repr(orig)) + else: + d = do_test(orig) + self.assertEqual(d, expect, "Error parsing %s" % repr(orig)) + + +def test_main(): + test_support.run_unittest(UrlParseTestCase) + +if __name__ == "__main__": + test_main() Added: sandbox/trunk/urilib/urlparse.py ============================================================================== --- (empty file) +++ sandbox/trunk/urilib/urlparse.py Mon Jun 18 22:21:14 2007 @@ -0,0 +1,466 @@ +"""Parse (absolute and relative) URLs. + +See RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, +UC Irvine, June 1995. +""" + +__all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag", + "urlsplit", "urlunsplit","parse_qs","parse_qsl"] + +# A classification of schemes ('' means apply by default) +uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap', + 'wais', 'file', 'https', 'shttp', 'mms', + 'prospero', 'rtsp', 'rtspu', '', 'sftp'] +uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet', + 'imap', 'wais', 'file', 'mms', 'https', 'shttp', + 'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '', + 'svn', 'svn+ssh', 'sftp'] +non_hierarchical = ['gopher', 'hdl', 'mailto', 'news', + 'telnet', 'wais', 'imap', 'snews', 'sip', 'sips'] +uses_params = ['ftp', 'hdl', 'prospero', 'http', 'imap', + 'https', 'shttp', 'rtsp', 'rtspu', 'sip', 'sips', + 'mms', '', 'sftp'] +uses_query = ['http', 'wais', 'imap', 'https', 'shttp', 'mms', + 'gopher', 'rtsp', 'rtspu', 'sip', 'sips', ''] +uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news', + 'nntp', 'wais', 'https', 'shttp', 'snews', + 'file', 'prospero', ''] + +# Characters valid in scheme names +scheme_chars = ('abcdefghijklmnopqrstuvwxyz' + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + '0123456789' + '+-.') + +MAX_CACHE_SIZE = 20 +_parse_cache = {} + +def clear_cache(): + """Clear the parse cache.""" + global _parse_cache + _parse_cache = {} + + +class BaseResult(tuple): + """Base class for the parsed result objects. + + This provides the attributes shared by the two derived result + objects as read-only properties. The derived classes are + responsible for checking the right number of arguments were + supplied to the constructor. + + """ + + __slots__ = () + + # Attributes that access the basic components of the URL: + + @property + def scheme(self): + return self[0] + + @property + def netloc(self): + return self[1] + + @property + def path(self): + return self[2] + + @property + def query(self): + return self[-2] + + @property + def fragment(self): + return self[-1] + + + # Additional attributes that provide access to parsed-out portions + # of the netloc: + + @property + def username(self): + netloc = self.netloc + if "@" in netloc: + userinfo = netloc.split("@", 1)[0] + if ":" in userinfo: + userinfo = userinfo.split(":", 1)[0] + return userinfo + return None + + @property + def password(self): + netloc = self.netloc + if "@" in netloc: + userinfo = netloc.split("@", 1)[0] + if ":" in userinfo: + return userinfo.split(":", 1)[1] + return None + + @property + def hostname(self): + netloc = self.netloc + if "@" in netloc: + netloc = netloc.split("@", 1)[1] + if ":" in netloc: + netloc = netloc.split(":", 1)[0] + return netloc.lower() or None + + @property + def port(self): + netloc = self.netloc + if "@" in netloc: + netloc = netloc.split("@", 1)[1] + if ":" in netloc: + port = netloc.split(":", 1)[1] + return int(port, 10) + return None + + # Additional methods that provide access to parsed out portions of + # query + + def parsedquery(self,keep_blank_values=0,strict_parsing=0): + return parse_qs(self.query,keep_blank_values,strict_parsing) + + def parsedquerylist(self,keep_blank_values=0,strict_parsing=0): + return parse_qsl(self.query,keep_blank_values,strict_parsing) + +class SplitResult(BaseResult): + + __slots__ = () + + def __new__(cls, scheme, netloc, path, query, fragment): + return BaseResult.__new__( + cls, (scheme, netloc, path, query, fragment)) + + def geturl(self): + return urlunsplit(self) + + +class ParseResult(BaseResult): + + __slots__ = () + + def __new__(cls, scheme, netloc, path, params, query, fragment): + return BaseResult.__new__( + cls, (scheme, netloc, path, params, query, fragment)) + + @property + def params(self): + return self[3] + + def geturl(self): + return urlunparse(self) + + +def urlparse(url, scheme='', allow_fragments=True): + """Parse a URL into 6 components: + :///;?# + Return a 6-tuple: (scheme, netloc, path, params, query, fragment). + Note that we don't break the components up in smaller bits + (e.g. netloc is a single string) and we don't expand % escapes.""" + tuple = urlsplit(url, scheme, allow_fragments) + scheme, netloc, url, query, fragment = tuple + if scheme in uses_params and ';' in url: + url, params = _splitparams(url) + else: + params = '' + return ParseResult(scheme, netloc, url, params, query, fragment) + +def _splitparams(url): + if '/' in url: + i = url.find(';', url.rfind('/')) + if i < 0: + return url, '' + else: + i = url.find(';') + return url[:i], url[i+1:] + +def _splitnetloc(url, start=0): + for c in '/?#': # the order is important! + delim = url.find(c, start) + if delim >= 0: + break + else: + delim = len(url) + return url[start:delim], url[delim:] + +def urlsplit(url, scheme='', allow_fragments=True): + """Parse a URL into 5 components: + :///?# + Return a 5-tuple: (scheme, netloc, path, query, fragment). + Note that we don't break the components up in smaller bits + (e.g. netloc is a single string) and we don't expand % escapes.""" + allow_fragments = bool(allow_fragments) + key = url, scheme, allow_fragments + cached = _parse_cache.get(key, None) + if cached: + return cached + if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth + clear_cache() + netloc = query = fragment = '' + i = url.find(':') + if i > 0: + if url[:i] == 'http': # optimize the common case + scheme = url[:i].lower() + url = url[i+1:] + if url[:2] == '//': + netloc, url = _splitnetloc(url, 2) + if allow_fragments and '#' in url: + url, fragment = url.split('#', 1) + if '?' in url: + url, query = url.split('?', 1) + v = SplitResult(scheme, netloc, url, query, fragment) + _parse_cache[key] = v + return v + for c in url[:i]: + if c not in scheme_chars: + break + else: + scheme, url = url[:i].lower(), url[i+1:] + if scheme in uses_netloc and url[:2] == '//': + netloc, url = _splitnetloc(url, 2) + if allow_fragments and scheme in uses_fragment and '#' in url: + url, fragment = url.split('#', 1) + if scheme in uses_query and '?' in url: + url, query = url.split('?', 1) + v = SplitResult(scheme, netloc, url, query, fragment) + _parse_cache[key] = v + return v + +def urlunparse((scheme, netloc, url, params, query, fragment)): + """Put a parsed URL back together again. This may result in a + slightly different, but equivalent URL, if the URL that was parsed + originally had redundant delimiters, e.g. a ? with an empty query + (the draft states that these are equivalent).""" + if params: + url = "%s;%s" % (url, params) + return urlunsplit((scheme, netloc, url, query, fragment)) + +def urlunsplit((scheme, netloc, url, query, fragment)): + if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'): + if url and url[:1] != '/': url = '/' + url + url = '//' + (netloc or '') + url + if scheme: + url = scheme + ':' + url + if query: + url = url + '?' + query + if fragment: + url = url + '#' + fragment + return url + +def urljoin(base, url, allow_fragments=True): + """Join a base URL and a possibly relative URL to form an absolute + interpretation of the latter.""" + if not base: + return url + if not url: + return base + bscheme, bnetloc, bpath, bparams, bquery, bfragment = \ + urlparse(base, '', allow_fragments) + scheme, netloc, path, params, query, fragment = \ + urlparse(url, bscheme, allow_fragments) + if scheme != bscheme or scheme not in uses_relative: + return url + if scheme in uses_netloc: + if netloc: + return urlunparse((scheme, netloc, path, + params, query, fragment)) + netloc = bnetloc + if path[:1] == '/': + return urlunparse((scheme, netloc, path, + params, query, fragment)) + if not (path or params or query): + return urlunparse((scheme, netloc, bpath, + bparams, bquery, fragment)) + segments = bpath.split('/')[:-1] + path.split('/') + # XXX The stuff below is bogus in various ways... + if segments[-1] == '.': + segments[-1] = '' + while '.' in segments: + segments.remove('.') + while 1: + i = 1 + n = len(segments) - 1 + while i < n: + if (segments[i] == '..' + and segments[i-1] not in ('', '..')): + del segments[i-1:i+1] + break + i = i+1 + else: + break + if segments == ['', '..']: + segments[-1] = '' + elif len(segments) >= 2 and segments[-1] == '..': + segments[-2:] = [''] + return urlunparse((scheme, netloc, '/'.join(segments), + params, query, fragment)) + +def urldefrag(url): + """Removes any existing fragment from URL. + + Returns a tuple of the defragmented URL and the fragment. If + the URL contained no fragments, the second element is the + empty string. + """ + if '#' in url: + s, n, p, a, q, frag = urlparse(url) + defrag = urlunparse((s, n, p, a, q, '')) + return defrag, frag + else: + return url, '' + +_hextochr = dict(('%02x' % i, chr(i)) for i in range(256)) +_hextochr.update(('%02X' % i, chr(i)) for i in range(256)) + +def unquote(s): + """unquote('abc%20def') -> 'abc def'.""" + res = s.split('%') + for i in xrange(1, len(res)): + item = res[i] + try: + res[i] = _hextochr[item[:2]] + item[2:] + except KeyError: + res[i] = '%' + item + except UnicodeDecodeError: + res[i] = unichr(int(item[:2], 16)) + item[2:] + return "".join(res) + +def parse_qs(qs, keep_blank_values=0, strict_parsing=0): + """Parse a query given as a string argument. + + Arguments: + + qs: URL-encoded query string to be parsed + + keep_blank_values: flag indicating whether blank values in + URL encoded queries should be treated as blank strings. + A true value indicates that blanks should be retained as + blank strings. The default false value indicates that + blank values are to be ignored and treated as if they were + not included. + + strict_parsing: flag indicating what to do with parsing errors. + If false (the default), errors are silently ignored. + If true, errors raise a ValueError exception. + """ + dict = {} + for name, value in parse_qsl(qs, keep_blank_values, strict_parsing): + if name in dict: + dict[name].append(value) + else: + dict[name] = [value] + return dict + +def parse_qsl(qs, keep_blank_values=0, strict_parsing=0): + """Parse a query given as a string argument. + + Arguments: + + qs: URL-encoded query string to be parsed + + keep_blank_values: flag indicating whether blank values in + URL encoded queries should be treated as blank strings. A + true value indicates that blanks should be retained as blank + strings. The default false value indicates that blank values + are to be ignored and treated as if they were not included. + + strict_parsing: flag indicating what to do with parsing errors. If + false (the default), errors are silently ignored. If true, + errors raise a ValueError exception. + + Returns a list, as G-d intended. + """ + pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')] + r = [] + for name_value in pairs: + if not name_value and not strict_parsing: + continue + nv = name_value.split('=', 1) + if len(nv) != 2: + if strict_parsing: + raise ValueError, "bad query field: %r" % (name_value,) + # Handle case of a control-name with no equal sign + if keep_blank_values: + nv.append('') + else: + continue + if len(nv[1]) or keep_blank_values: + name = unquote(nv[0].replace('+', ' ')) + value = unquote(nv[1].replace('+', ' ')) + r.append((name, value)) + + return r + + +test_input = """ + http://a/b/c/d + + g:h = + http:g = + http: = + g = + ./g = + g/ = + /g = + //g = + ?y = + g?y = + g?y/./x = + . = + ./ = + .. = + ../ = + ../g = + ../.. = + ../../g = + ../../../g = + ./../g = + ./g/. = + /./g = + g/./h = + g/../h = + http:g = + http: = + http:?y = + http:g?y = + http:g?y/./x = +""" + +def test(): + import sys + base = '' + if sys.argv[1:]: + fn = sys.argv[1] + if fn == '-': + fp = sys.stdin + else: + fp = open(fn) + else: + try: + from cStringIO import StringIO + except ImportError: + from StringIO import StringIO + fp = StringIO(test_input) + while 1: + line = fp.readline() + if not line: break + words = line.split() + if not words: + continue + url = words[0] + parts = urlparse(url) + print '%-10s : %s' % (url, parts) + abs = urljoin(base, url) + if not base: + base = abs + wrapped = '' % abs + print '%-10s = %s' % (url, wrapped) + if len(words) == 3 and words[1] == '=': + if wrapped != words[2]: + print 'EXPECTED', words[2], '!!!!!!!!!!' + +if __name__ == '__main__': + test() From python-checkins at python.org Tue Jun 19 01:12:19 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 01:12:19 +0200 (CEST) Subject: [Python-checkins] r56026 - sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070618231219.4EDA01E4006@bag.python.org> Author: brett.cannon Date: Tue Jun 19 01:12:15 2007 New Revision: 56026 Modified: sandbox/trunk/pep0/pep0/pep.py Log: Add comments of what needs to be done. Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Tue Jun 19 01:12:15 2007 @@ -29,13 +29,16 @@ """ type_values = ("Standards Track", "Informational", "Process") - # Active and Draft are not listed in the index. + # XXX Active PEPs can only be for Informational or Process PEPs. status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", "Active", "Draft", "Replaced") # XXX Uncomment to valid author names (along with code in __init__). #valid_authors = set(x[0] for x in constants.email_addresses) + # XXX Take in an open file. + # XXX Parse header metadata (verify order and that all required fields + # exist). def __init__(self, metadata_dict): """Init object based on dict containing metadata from a file. From python-checkins at python.org Tue Jun 19 01:32:08 2007 From: python-checkins at python.org (guido.van.rossum) Date: Tue, 19 Jun 2007 01:32:08 +0200 (CEST) Subject: [Python-checkins] r56027 - peps/trunk/pep-3099.txt Message-ID: <20070618233208.307D81E4006@bag.python.org> Author: guido.van.rossum Date: Tue Jun 19 01:32:03 2007 New Revision: 56027 Modified: peps/trunk/pep-3099.txt Log: Drop a bullet that conflicts with PEP 3131's status. Modified: peps/trunk/pep-3099.txt ============================================================================== --- peps/trunk/pep-3099.txt (original) +++ peps/trunk/pep-3099.txt Tue Jun 19 01:32:03 2007 @@ -87,12 +87,6 @@ Thread: "Adding sorting to generator comprehension", http://mail.python.org/pipermail/python-3000/2006-April/001295.html -* Python 3000 source code won't use non-ASCII Unicode characters for - anything except string literals or comments. - - Thread: sets in P3K? - http://mail.python.org/pipermail/python-3000/2006-April/001474.html - * Slices and extended slices won't go away (even if the __getslice__ and __setslice__ APIs may be replaced) nor will they return views for the standard object types. From python-checkins at python.org Tue Jun 19 01:49:34 2007 From: python-checkins at python.org (guido.van.rossum) Date: Tue, 19 Jun 2007 01:49:34 +0200 (CEST) Subject: [Python-checkins] r56028 - peps/trunk/pep-3100.txt Message-ID: <20070618234934.6846A1E4006@bag.python.org> Author: guido.van.rossum Date: Tue Jun 19 01:49:27 2007 New Revision: 56028 Modified: peps/trunk/pep-3100.txt Log: Some updates. Remove an item that's covered by acceptance of PEP 3121. Remove an item that's covered by rejection of PEP 3122 and PEP 299. Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Tue Jun 19 01:49:27 2007 @@ -98,9 +98,6 @@ [x for x in 1, 2] will need to be: [x for x in (1, 2)] - Lambdas may have to be parenthesized [#pep308]_ -* Builtin module init function names (PyMODINIT_FUNC) will be prefixed - with _Py (or Py). Currently they aren't namespace safe since the names - start with init. * __builtins__ should get a different name *or* completely unified with __builtin__. Keeping both with confusingly similar spellings and semantics is evil. [#__builtin__]_ @@ -112,7 +109,6 @@ NB. {range(x)} means set([range(x)]), NOT set(range(x)). There's no literal for an empty set; use set() (or {1}&{2} :-). There's no frozenset literal; they are too rarely needed. -* Might reconsider PEP 299 [#pep299]_: special __main__() function in modules. * The ``__nonzero__`` special method will be renamed to ``__bool__`` and have to return a bool. The typeobject slot will be called ``tp_bool`` [23]_ [done] @@ -149,11 +145,12 @@ literals with 'L' or 'l' suffix disappear [1]_ [done] * Make all strings be Unicode, and have a separate bytes() type [1]_ The new string type will be called 'str'. + [halfway done, in py3k-struni branch] * Return iterable views instead of lists where appropriate for atomic type methods (e.g. ``dict.keys()``, ``dict.values()``, ``dict.items()``, etc.); iter* methods will be removed. [done] * Make ``string.join()`` stringify its arguments? [18]_ -* Fix file() so it returns a ValueError if the mode is bad rather than IOError. +* Fix open() so it returns a ValueError if the mode is bad rather than IOError. (This probably affects lots of places, we should review the exceptions and fix them if inappropriate.) From python-checkins at python.org Tue Jun 19 02:24:10 2007 From: python-checkins at python.org (guido.van.rossum) Date: Tue, 19 Jun 2007 02:24:10 +0200 (CEST) Subject: [Python-checkins] r56029 - peps/trunk/pep-3000.txt Message-ID: <20070619002410.9B35D1E4006@bag.python.org> Author: guido.van.rossum Date: Tue Jun 19 02:24:07 2007 New Revision: 56029 Modified: peps/trunk/pep-3000.txt Log: Update the schedule. Give more detail about compatibility and transition. Add a References section. Modified: peps/trunk/pep-3000.txt ============================================================================== --- peps/trunk/pep-3000.txt (original) +++ peps/trunk/pep-3000.txt Tue Jun 19 02:24:07 2007 @@ -48,13 +48,19 @@ Timeline ======== -I no longer think we need a meta-PEP for the Python 3000 timeline; -instead, here's my current proposal. I hope to have a first alpha -release (3.0a1) out in the first half of 2007; it should take no more -than a year from then before the first proper release, named Python -3.0. I would like all PEPs for features going into Python 3000 to be -submitted by the end of April 2007 (allowing time for discussion and -implementation after the initial submission). +Past deadlines: + +* April 2007: feature PEPs submitted (except library reform proposals). + +Hopeful future deadlines: + +* August 2007: release 3.0a1. +* December 2007: release 2.6a1. +* April 2008: full feature freeze. +* June 2008: release 2.6 (final). +* August 2008: release 3.0 (final). + +See PEP 361 for more details on the Python 2.6 release schedule. Note: standard library development is expected to ramp up after 3.0a1 is released; it is exempt from the April 2007 PEP deadline. @@ -77,27 +83,51 @@ Compatibility and Transition ============================ -We need a meta-PEP to describe the compatibility requirements. Python -3000 will break backwards compatibility. There is no requirement that -Python 2.9 code will run unmodified on Python 3.0. - -I'm not sure whether it is reasonable to require that Python 2.x code -can be mechanically translated to equivalent Python 3.0 code; Python's -dynamic typing combined with the plans to change the semantics of -certain methods of dictionaries, for example, would make this task -really hard. However, it would be great if there was some tool that -did at least an 80% job of translation, pointing out areas where it -wasn't sure using comments or warnings. Perhaps such a tool could be -based on something like Pychecker. - -Another kind of tool could be an instrumented version of 2.x which -produces run-time warnings about constructs that will get a different -meaning in 3.0. This can't be used for all incompatibilities, but -it's likely to help reach a larger percentage of correct translations. -(This approach is already in place for detecting reliance on '/' to do -integer division; see Tools/scripts/fixdiv.py, which finds occurrences -of int/int and long/long that were flagged by running your program -with -Qwarnall.) +Python 3.0 will break backwards compatibility with Python 2.x. + +**There is no requirement that Python 2.6 code will run unmodified on +Python 3.0.** Not even a subset. (Of course there will be a *tiny* +subset, but it will be missing major functionality.) + +Python 2.6 will support forward compatibility in the following two +ways: + +* It will support a "Py3k warnings mode" which will warn dynamically + (i.e. at runtime) about features that will stop working in Python + 3.0, e.g. assuming that range() returns a list. +* It will contain backported versions of many Py3k features, either + enabled through __future__ statements or simply by allowing old and + new syntax to be used side-by-side (if the new syntax would be a + syntax error in 2.x). + +Instead, and complementary to the forward compatibility features in +2.6, there will be a separate source code conversion tool [1]_. This +tool can do a context-free source-to-source translation. For example, +it can translate ``apply(f, args)`` into ``f(*args)``. However, the +tool cannot do data flow analysis or type inferencing, so it simply +assumes that ``apply`` in this example refers to the old built-in +function. + +The recommended development model for a project that needs to support +Python 2.6 and 3.0 imultaneously is as follows: + +0. You should have excellent unit tests with close to full coverage. +1. Port your project to Python 2.6. +2. Turn on the Py3k warnings mode. +3. Test and edit until no warnings remain. +4. Use the 2to3 tool to convert this source code to 3.0 syntax. + **Do not manually edit the output!** +5. Test the converted source code under 3.0. +6. If problems are found, make corrections to the **2.6** version + of the source code and go back to step 3. +7. When it's time to release, release separate 2.6 and 3.0 tarballs + (or whatever archive form you use for releases). + +It is recommended not to edit the 3.0 source code until you are ready +to reduce 2.6 support to pure maintenance (i.e. the moment when you +would normally move the 2.6 code to a maintenance branch anyway). + +PS. We need a meta-PEP to describe the transitional issues in detail. Implementation Language @@ -105,7 +135,7 @@ Python 3000 will be implemented in C, and the implementation will be derived as an evolution of the Python 2 code base. This reflects my -views (which I share with Joel Spolsky) on the dangers of complete +views (which I share with Joel Spolsky [2]_) on the dangers of complete rewrites. Since Python 3000 as a language is a relatively mild improvement on Python 2, we can gain a lot by not attempting to reimplement the language from scratch. I am not against parallel @@ -121,6 +151,16 @@ topics are even more welcome! +References +========== + +.. [1] The 2to3 tool, in the subversion sandbox + http://svn.python.org/view/sandbox/trunk/2to3/ + +.. [2] Joel on Software: Things You Should Never Do, Part I + http://www.joelonsoftware.com/articles/fog0000000069.html + + Copyright ========= From python-checkins at python.org Tue Jun 19 03:05:15 2007 From: python-checkins at python.org (neal.norwitz) Date: Tue, 19 Jun 2007 03:05:15 +0200 (CEST) Subject: [Python-checkins] r56030 - peps/trunk/pep-3000.txt Message-ID: <20070619010515.6C3F61E4006@bag.python.org> Author: neal.norwitz Date: Tue Jun 19 03:05:14 2007 New Revision: 56030 Modified: peps/trunk/pep-3000.txt Log: Fix typo Modified: peps/trunk/pep-3000.txt ============================================================================== --- peps/trunk/pep-3000.txt (original) +++ peps/trunk/pep-3000.txt Tue Jun 19 03:05:14 2007 @@ -109,7 +109,7 @@ function. The recommended development model for a project that needs to support -Python 2.6 and 3.0 imultaneously is as follows: +Python 2.6 and 3.0 simultaneously is as follows: 0. You should have excellent unit tests with close to full coverage. 1. Port your project to Python 2.6. From python-checkins at python.org Tue Jun 19 03:45:11 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 03:45:11 +0200 (CEST) Subject: [Python-checkins] r56031 - peps/trunk/pep-0286.txt peps/trunk/pep-0364.txt peps/trunk/pep-3134.txt Message-ID: <20070619014511.B18D61E4006@bag.python.org> Author: brett.cannon Date: Tue Jun 19 03:45:08 2007 New Revision: 56031 Modified: peps/trunk/pep-0286.txt peps/trunk/pep-0364.txt peps/trunk/pep-3134.txt Log: Fix PEPs that improperly listed their status as Active; that status is reserved for only Informational and Process PEPs. Modified: peps/trunk/pep-0286.txt ============================================================================== --- peps/trunk/pep-0286.txt (original) +++ peps/trunk/pep-0286.txt Tue Jun 19 03:45:08 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: loewis at informatik.hu-berlin.de (Martin von Loewis) -Status: Active +Status: Draft Type: Standards Track Created: 3-Mar-2002 Python-Version: 2.3 Modified: peps/trunk/pep-0364.txt ============================================================================== --- peps/trunk/pep-0364.txt (original) +++ peps/trunk/pep-0364.txt Tue Jun 19 03:45:08 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: Barry A. Warsaw -Status: Active +Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 01-Mar-2007 Modified: peps/trunk/pep-3134.txt ============================================================================== --- peps/trunk/pep-3134.txt (original) +++ peps/trunk/pep-3134.txt Tue Jun 19 03:45:08 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: Ka-Ping Yee -Status: Active +Status: Draft Type: Standards Track Content-Type: text/plain Created: 12-May-2005 From python-checkins at python.org Tue Jun 19 03:46:35 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 03:46:35 +0200 (CEST) Subject: [Python-checkins] r56032 - sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070619014635.3CAA21E4006@bag.python.org> Author: brett.cannon Date: Tue Jun 19 03:46:33 2007 New Revision: 56032 Modified: sandbox/trunk/pep0/pep0/pep.py Log: Allow only Informational or Process PEPs to be Active. Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Tue Jun 19 03:46:33 2007 @@ -29,7 +29,7 @@ """ type_values = ("Standards Track", "Informational", "Process") - # XXX Active PEPs can only be for Informational or Process PEPs. + # Active PEPs can only be for Informational or Process PEPs. status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", "Active", "Draft", "Replaced") @@ -81,6 +81,11 @@ if status not in self.status_values: raise ValueError("%r is not a valid Status value (PEP %s)" % (status, self.number)) + # Special case for Active PEPs. + if (status == "Active" and + self.type_ not in ("Process", "Informational")): + raise ValueError("Only Process and Informational PEPs may have an " + "Active status (PEP %s)" % self.number) self.status = status # 'Author'. authors = self._parse_author(metadata_dict['Author']) From python-checkins at python.org Tue Jun 19 06:20:36 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 06:20:36 +0200 (CEST) Subject: [Python-checkins] r56033 - peps/trunk/pep-0004.txt peps/trunk/pep-0005.txt peps/trunk/pep-0042.txt peps/trunk/pep-0200.txt peps/trunk/pep-0201.txt peps/trunk/pep-0202.txt peps/trunk/pep-0203.txt peps/trunk/pep-0204.txt peps/trunk/pep-0205.txt peps/trunk/pep-0206.txt peps/trunk/pep-0207.txt peps/trunk/pep-0208.txt peps/trunk/pep-0209.txt peps/trunk/pep-0210.txt peps/trunk/pep-0211.txt peps/trunk/pep-0212.txt peps/trunk/pep-0213.txt peps/trunk/pep-0214.txt peps/trunk/pep-0215.txt peps/trunk/pep-0216.txt peps/trunk/pep-0217.txt peps/trunk/pep-0218.txt peps/trunk/pep-0221.txt peps/trunk/pep-0222.txt peps/trunk/pep-0223.txt peps/trunk/pep-0224.txt peps/trunk/pep-0225.txt peps/trunk/pep-0227.txt peps/trunk/pep-0228.txt peps/trunk/pep-0230.txt peps/trunk/pep-0231.txt peps/trunk/pep-0234.txt peps/trunk/pep-0235.txt peps/trunk/pep-0236.txt peps/trunk/pep-0241.txt peps/trunk/pep-0248.txt peps/trunk/pep-0249.txt peps/trunk/pep-0250.txt peps/trunk/pep-0252.txt peps/trunk/pep-0253.txt peps/trunk/pep-0254.txt peps/trunk/pep-0255.txt peps/trunk/pep-0259.txt peps/trunk/pep-0260.txt peps/trunk/pep-0262.txt peps/trunk/pep-0263.txt peps/trunk/pep-0266.txt peps/trunk/pep-0268.txt peps/trunk/pep-0273.txt peps/trunk/pep-0275.txt peps/trunk/pep-0281.txt peps/trunk/pep-0291.txt peps/trunk/pep-0297.txt peps/trunk/pep-0299.txt peps/trunk/pep-0314.txt peps/trunk/pep-0321.txt peps/trunk/pep-0324.txt peps/trunk/pep-0328.txt peps/trunk/pep-0334.txt peps/trunk/pep-0344.txt peps/trunk/pep-0345.txt peps/trunk/pep-0349.txt peps/trunk/pep-0351.txt peps/trunk/pep-0355.txt peps/trunk/pep-0357.txt peps/trunk/pep-0360.txt peps/trunk/pep-0362.txt peps/trunk/pep-3001.txt peps/trunk/pep-3099.txt peps/trunk/pep-3103.txt peps/trunk/pep-3104.txt peps/trunk/pep-3105.txt peps/trunk/pep-3107.txt peps/trunk/pep-3108.txt peps/trunk/pep-3113.txt peps/trunk/pep-3114.txt peps/trunk/pep-3116.txt peps/trunk/pep-3117.txt peps/trunk/pep-3118.txt peps/trunk/pep-3122.txt peps/trunk/pep-3124.txt peps/trunk/pep-3127.txt peps/trunk/pep-3133.txt peps/trunk/pep-3134.txt Message-ID: <20070619042036.E5F8D1E4007@bag.python.org> Author: brett.cannon Date: Tue Jun 19 06:20:07 2007 New Revision: 56033 Modified: peps/trunk/pep-0004.txt peps/trunk/pep-0005.txt peps/trunk/pep-0042.txt peps/trunk/pep-0200.txt peps/trunk/pep-0201.txt peps/trunk/pep-0202.txt peps/trunk/pep-0203.txt peps/trunk/pep-0204.txt peps/trunk/pep-0205.txt peps/trunk/pep-0206.txt peps/trunk/pep-0207.txt peps/trunk/pep-0208.txt peps/trunk/pep-0209.txt peps/trunk/pep-0210.txt peps/trunk/pep-0211.txt peps/trunk/pep-0212.txt peps/trunk/pep-0213.txt peps/trunk/pep-0214.txt peps/trunk/pep-0215.txt peps/trunk/pep-0216.txt peps/trunk/pep-0217.txt peps/trunk/pep-0218.txt peps/trunk/pep-0221.txt peps/trunk/pep-0222.txt peps/trunk/pep-0223.txt peps/trunk/pep-0224.txt peps/trunk/pep-0225.txt peps/trunk/pep-0227.txt peps/trunk/pep-0228.txt peps/trunk/pep-0230.txt peps/trunk/pep-0231.txt peps/trunk/pep-0234.txt peps/trunk/pep-0235.txt peps/trunk/pep-0236.txt peps/trunk/pep-0241.txt peps/trunk/pep-0248.txt peps/trunk/pep-0249.txt peps/trunk/pep-0250.txt peps/trunk/pep-0252.txt peps/trunk/pep-0253.txt peps/trunk/pep-0254.txt peps/trunk/pep-0255.txt peps/trunk/pep-0259.txt peps/trunk/pep-0260.txt peps/trunk/pep-0262.txt peps/trunk/pep-0263.txt peps/trunk/pep-0266.txt peps/trunk/pep-0268.txt peps/trunk/pep-0273.txt peps/trunk/pep-0275.txt peps/trunk/pep-0281.txt peps/trunk/pep-0291.txt peps/trunk/pep-0297.txt peps/trunk/pep-0299.txt peps/trunk/pep-0314.txt peps/trunk/pep-0321.txt peps/trunk/pep-0324.txt peps/trunk/pep-0328.txt peps/trunk/pep-0334.txt peps/trunk/pep-0344.txt peps/trunk/pep-0345.txt peps/trunk/pep-0349.txt peps/trunk/pep-0351.txt peps/trunk/pep-0355.txt peps/trunk/pep-0357.txt peps/trunk/pep-0360.txt peps/trunk/pep-0362.txt peps/trunk/pep-3001.txt peps/trunk/pep-3099.txt peps/trunk/pep-3103.txt peps/trunk/pep-3104.txt peps/trunk/pep-3105.txt peps/trunk/pep-3107.txt peps/trunk/pep-3108.txt peps/trunk/pep-3113.txt peps/trunk/pep-3114.txt peps/trunk/pep-3116.txt peps/trunk/pep-3117.txt peps/trunk/pep-3118.txt peps/trunk/pep-3122.txt peps/trunk/pep-3124.txt peps/trunk/pep-3127.txt peps/trunk/pep-3133.txt peps/trunk/pep-3134.txt Log: Fix the headers so that they are in the right order and no required headers are missing. Modified: peps/trunk/pep-0004.txt ============================================================================== --- peps/trunk/pep-0004.txt (original) +++ peps/trunk/pep-0004.txt Tue Jun 19 06:20:07 2007 @@ -6,6 +6,7 @@ Status: Active Type: Informational Created: 1-Oct-2000 +Post-History: Introduction Modified: peps/trunk/pep-0005.txt ============================================================================== --- peps/trunk/pep-0005.txt (original) +++ peps/trunk/pep-0005.txt Tue Jun 19 06:20:07 2007 @@ -6,6 +6,7 @@ Status: Active Type: Informational Created: 26-Oct-2000 +Post-History: Abstract Modified: peps/trunk/pep-0042.txt ============================================================================== --- peps/trunk/pep-0042.txt (original) +++ peps/trunk/pep-0042.txt Tue Jun 19 06:20:07 2007 @@ -6,6 +6,7 @@ Status: Active Type: Informational Created: 12-Sep-2000 +Post-History: Introduction Modified: peps/trunk/pep-0200.txt ============================================================================== --- peps/trunk/pep-0200.txt (original) +++ peps/trunk/pep-0200.txt Tue Jun 19 06:20:07 2007 @@ -3,9 +3,11 @@ Version: $Revision$ Last-Modified: $Date$ Author: Jeremy Hylton -Python-Version: 2.0 -Type: Informational Status: Final +Type: Informational +Created: +Python-Version: 2.0 +Post-History: Introduction Modified: peps/trunk/pep-0201.txt ============================================================================== --- peps/trunk/pep-0201.txt (original) +++ peps/trunk/pep-0201.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: barry at python.org (Barry A. Warsaw) Status: Final Type: Standards Track -Python-Version: 2.0 Created: 13-Jul-2000 +Python-Version: 2.0 Post-History: 27-Jul-2000 Modified: peps/trunk/pep-0202.txt ============================================================================== --- peps/trunk/pep-0202.txt (original) +++ peps/trunk/pep-0202.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: barry at python.org (Barry Warsaw) Status: Final Type: Standards Track -Python-Version: 2.0 Created: 13-Jul-2000 +Python-Version: 2.0 Post-History: Modified: peps/trunk/pep-0203.txt ============================================================================== --- peps/trunk/pep-0203.txt (original) +++ peps/trunk/pep-0203.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: thomas at python.org (Thomas Wouters) Status: Final Type: Standards Track -Python-Version: 2.0 Created: 13-Jul-2000 +Python-Version: 2.0 Post-History: 14-Aug-2000 Modified: peps/trunk/pep-0204.txt ============================================================================== --- peps/trunk/pep-0204.txt (original) +++ peps/trunk/pep-0204.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: thomas at python.org (Thomas Wouters) Status: Rejected Type: Standards Track -Python-Version: 2.0 Created: 14-Jul-2000 +Python-Version: 2.0 Post-History: Modified: peps/trunk/pep-0205.txt ============================================================================== --- peps/trunk/pep-0205.txt (original) +++ peps/trunk/pep-0205.txt Tue Jun 19 06:20:07 2007 @@ -3,9 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: Fred L. Drake, Jr. -Python-Version: 2.1 Status: Final Type: Standards Track +Created: +Python-Version: 2.1 Post-History: 11-Jan-2001 Motivation Modified: peps/trunk/pep-0206.txt ============================================================================== --- peps/trunk/pep-0206.txt (original) +++ peps/trunk/pep-0206.txt Tue Jun 19 06:20:07 2007 @@ -3,8 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: A.M. Kuchling -Type: Informational Status: Withdrawn +Type: Informational +Created: +Post-History: Introduction Modified: peps/trunk/pep-0207.txt ============================================================================== --- peps/trunk/pep-0207.txt (original) +++ peps/trunk/pep-0207.txt Tue Jun 19 06:20:07 2007 @@ -3,9 +3,11 @@ Version: $Revision$ Last-Modified: $Date$ Author: guido at python.org (Guido van Rossum), DavidA at ActiveState.com (David Ascher) -Python-Version: 2.1 -Type: Standards Track Status: Final +Type: Standards Track +Created: +Python-Version: 2.1 +Post-History: Abstract Modified: peps/trunk/pep-0208.txt ============================================================================== --- peps/trunk/pep-0208.txt (original) +++ peps/trunk/pep-0208.txt Tue Jun 19 06:20:07 2007 @@ -6,8 +6,8 @@ Status: Final Type: Standards Track Created: 04-Dec-2000 -Post-History: Python-Version: 2.1 +Post-History: Abstract Modified: peps/trunk/pep-0209.txt ============================================================================== --- peps/trunk/pep-0209.txt (original) +++ peps/trunk/pep-0209.txt Tue Jun 19 06:20:07 2007 @@ -3,10 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: barrett at stsci.edu (Paul Barrett), oliphant at ee.byu.edu (Travis Oliphant) -Python-Version: 2.2 Status: Withdrawn Type: Standards Track Created: 03-Jan-2001 +Python-Version: 2.2 Post-History: Modified: peps/trunk/pep-0210.txt ============================================================================== --- peps/trunk/pep-0210.txt (original) +++ peps/trunk/pep-0210.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: davida at activestate.com (David Ascher) Status: Rejected Type: Standards Track -Python-Version: 2.1 Created: 15-Jul-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0211.txt ============================================================================== --- peps/trunk/pep-0211.txt (original) +++ peps/trunk/pep-0211.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: gvwilson at ddj.com (Greg Wilson) Status: Deferred Type: Standards Track -Python-Version: 2.1 Created: 15-Jul-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0212.txt ============================================================================== --- peps/trunk/pep-0212.txt (original) +++ peps/trunk/pep-0212.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Standards Track Created: 22-Aug-2000 Python-Version: 2.1 +Post-History: Introduction Modified: peps/trunk/pep-0213.txt ============================================================================== --- peps/trunk/pep-0213.txt (original) +++ peps/trunk/pep-0213.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: paul at prescod.net (Paul Prescod) Status: Deferred Type: Standards Track -Python-Version: 2.1 Created: 21-Jul-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0214.txt ============================================================================== --- peps/trunk/pep-0214.txt (original) +++ peps/trunk/pep-0214.txt Tue Jun 19 06:20:07 2007 @@ -3,10 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: barry at python.org (Barry A. Warsaw) -Python-Version: 2.0 -Type: Standards Track Status: Final +Type: Standards Track Created: 24-Jul-2000 +Python-Version: 2.0 Post-History: 16-Aug-2000 Modified: peps/trunk/pep-0215.txt ============================================================================== --- peps/trunk/pep-0215.txt (original) +++ peps/trunk/pep-0215.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: ping at lfw.org (Ka-Ping Yee) Status: Rejected Type: Standards Track -Python-Version: 2.1 Created: 24-Jul-2000 +Python-Version: 2.1 Post-History: Replaced-By: 292 Modified: peps/trunk/pep-0216.txt ============================================================================== --- peps/trunk/pep-0216.txt (original) +++ peps/trunk/pep-0216.txt Tue Jun 19 06:20:07 2007 @@ -6,6 +6,7 @@ Status: Rejected Type: Informational Created: 31-Jul-2000 +Post-History: Replaced-By: 287 Notice Modified: peps/trunk/pep-0217.txt ============================================================================== --- peps/trunk/pep-0217.txt (original) +++ peps/trunk/pep-0217.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: peps at zadka.site.co.il (Moshe Zadka) Status: Final Type: Standards Track -Python-Version: 2.1 Created: 31-Jul-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0218.txt ============================================================================== --- peps/trunk/pep-0218.txt (original) +++ peps/trunk/pep-0218.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: gvwilson at ddj.com (Greg Wilson), python at rcn.com (Raymond Hettinger) Status: Final Type: Standards Track -Python-Version: 2.2 Created: 31-Jul-2000 +Python-Version: 2.2 Post-History: Modified: peps/trunk/pep-0221.txt ============================================================================== --- peps/trunk/pep-0221.txt (original) +++ peps/trunk/pep-0221.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: thomas at python.org (Thomas Wouters) Status: Final Type: Standards Track -Python-Version: 2.0 Created: 15-Aug-2000 +Python-Version: 2.0 Post-History: Modified: peps/trunk/pep-0222.txt ============================================================================== --- peps/trunk/pep-0222.txt (original) +++ peps/trunk/pep-0222.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: A.M. Kuchling Status: Deferred Type: Standards Track -Python-Version: 2.1 Created: 18-Aug-2000 +Python-Version: 2.1 Post-History: 22-Dec-2000 Modified: peps/trunk/pep-0223.txt ============================================================================== --- peps/trunk/pep-0223.txt (original) +++ peps/trunk/pep-0223.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: tim at zope.com (Tim Peters) Status: Final Type: Standards Track -Python-Version: 2.0 Created: 20-Aug-2000 +Python-Version: 2.0 Post-History: 23-Aug-2000 Modified: peps/trunk/pep-0224.txt ============================================================================== --- peps/trunk/pep-0224.txt (original) +++ peps/trunk/pep-0224.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: mal at lemburg.com (Marc-Andre Lemburg) Status: Rejected Type: Standards Track -Python-Version: 2.1 Created: 23-Aug-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0225.txt ============================================================================== --- peps/trunk/pep-0225.txt (original) +++ peps/trunk/pep-0225.txt Tue Jun 19 06:20:07 2007 @@ -6,8 +6,8 @@ gregory.lielens at fft.be (Gregory Lielens) Status: Deferred Type: Standards Track -Python-Version: 2.1 Created: 19-Sep-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0227.txt ============================================================================== --- peps/trunk/pep-0227.txt (original) +++ peps/trunk/pep-0227.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: jeremy at zope.com (Jeremy Hylton) Status: Draft Type: Standards Track -Python-Version: 2.1 Created: 01-Nov-2000 +Python-Version: 2.1 Post-History: Abstract Modified: peps/trunk/pep-0228.txt ============================================================================== --- peps/trunk/pep-0228.txt (original) +++ peps/trunk/pep-0228.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: pep at zadka.site.co.il (Moshe Zadka), guido at python.org (Guido van Rossum) Status: Withdrawn Type: Standards Track -Python-Version: ?? Created: 4-Nov-2000 +Python-Version: ?? Post-History: Modified: peps/trunk/pep-0230.txt ============================================================================== --- peps/trunk/pep-0230.txt (original) +++ peps/trunk/pep-0230.txt Tue Jun 19 06:20:07 2007 @@ -3,9 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: guido at python.org (Guido van Rossum) +Status: Final Type: Standards Track +Created: Python-Version: 2.1 -Status: Final Post-History: 05-Nov-2000 Modified: peps/trunk/pep-0231.txt ============================================================================== --- peps/trunk/pep-0231.txt (original) +++ peps/trunk/pep-0231.txt Tue Jun 19 06:20:07 2007 @@ -3,10 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: barry at python.org (Barry A. Warsaw) -Python-Version: 2.1 Status: Rejected Type: Standards Track Created: 30-Nov-2000 +Python-Version: 2.1 Post-History: Modified: peps/trunk/pep-0234.txt ============================================================================== --- peps/trunk/pep-0234.txt (original) +++ peps/trunk/pep-0234.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: ping at lfw.org (Ka-Ping Yee), guido at python.org (Guido van Rossum) Status: Final Type: Standards Track -Python-Version: 2.1 Created: 30-Jan-2001 +Python-Version: 2.1 Post-History: 30-Apr-2001 Abstract Modified: peps/trunk/pep-0235.txt ============================================================================== --- peps/trunk/pep-0235.txt (original) +++ peps/trunk/pep-0235.txt Tue Jun 19 06:20:07 2007 @@ -5,6 +5,7 @@ Author: Tim Peters Status: Final Type: Standards Track +Created: Python-Version: 2.1 Post-History: 16 February 2001 Modified: peps/trunk/pep-0236.txt ============================================================================== --- peps/trunk/pep-0236.txt (original) +++ peps/trunk/pep-0236.txt Tue Jun 19 06:20:07 2007 @@ -3,10 +3,10 @@ Version: $Revision$ Last-Modified: $Date$ Author: Tim Peters -Python-Version: 2.1 Status: Final Type: Standards Track Created: 26-Feb-2001 +Python-Version: 2.1 Post-History: 26-Feb-2001 Modified: peps/trunk/pep-0241.txt ============================================================================== --- peps/trunk/pep-0241.txt (original) +++ peps/trunk/pep-0241.txt Tue Jun 19 06:20:07 2007 @@ -3,9 +3,9 @@ Version: $Revision$ Last-Modified: $Date$ Author: A.M. Kuchling +Status: Final Type: Standards Track Created: 12-Mar-2001 -Status: Final Post-History: 19-Mar-2001 Introduction Modified: peps/trunk/pep-0248.txt ============================================================================== --- peps/trunk/pep-0248.txt (original) +++ peps/trunk/pep-0248.txt Tue Jun 19 06:20:07 2007 @@ -2,12 +2,13 @@ Title: Python Database API Specification v1.0 Version: $Revision$ Last-Modified: $Date$ -Author: db-sig at python.org (Python Database SIG) -Editor: mal at lemburg.com (Marc-Andre Lemburg) +Author: db-sig at python.org (Python Database SIG), + mal at lemburg.com (Marc-Andre Lemburg) Status: Final -Replaced-By: 249 Type: Informational -Release-Date: 09 Apr 1996 +Created: +Post-History: +Replaced-By: 249 Introduction Modified: peps/trunk/pep-0249.txt ============================================================================== --- peps/trunk/pep-0249.txt (original) +++ peps/trunk/pep-0249.txt Tue Jun 19 06:20:07 2007 @@ -2,12 +2,13 @@ Title: Python Database API Specification v2.0 Version: $Revision$ Last-Modified: $Date$ -Author: db-sig at python.org (Python Database SIG) -Editor: mal at lemburg.com (Marc-Andre Lemburg) +Author: db-sig at python.org (Python Database SIG), + mal at lemburg.com (Marc-Andre Lemburg) Status: Final Type: Informational +Created: +Post-History: Replaces: 248 -Release-Date: 07 Apr 1999 Introduction Modified: peps/trunk/pep-0250.txt ============================================================================== --- peps/trunk/pep-0250.txt (original) +++ peps/trunk/pep-0250.txt Tue Jun 19 06:20:07 2007 @@ -1,6 +1,6 @@ PEP: 250 Title: Using site-packages on Windows -Version $Revision$ +Version: $Revision$ Last-Modified: $Date$ Author: gustav at morpheus.demon.co.uk (Paul Moore) Status: Final Modified: peps/trunk/pep-0252.txt ============================================================================== --- peps/trunk/pep-0252.txt (original) +++ peps/trunk/pep-0252.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: guido at python.org (Guido van Rossum) Status: Final Type: Standards Track -Python-Version: 2.2 Created: 19-Apr-2001 +Python-Version: 2.2 Post-History: Abstract Modified: peps/trunk/pep-0253.txt ============================================================================== --- peps/trunk/pep-0253.txt (original) +++ peps/trunk/pep-0253.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: guido at python.org (Guido van Rossum) Status: Final Type: Standards Track -Python-Version: 2.2 Created: 14-May-2001 +Python-Version: 2.2 Post-History: Abstract Modified: peps/trunk/pep-0254.txt ============================================================================== --- peps/trunk/pep-0254.txt (original) +++ peps/trunk/pep-0254.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: guido at python.org (Guido van Rossum) Status: Rejected Type: Standards Track -Python-Version: 2.2 Created: 18-June-2001 +Python-Version: 2.2 Post-History: Abstract Modified: peps/trunk/pep-0255.txt ============================================================================== --- peps/trunk/pep-0255.txt (original) +++ peps/trunk/pep-0255.txt Tue Jun 19 06:20:07 2007 @@ -5,7 +5,7 @@ Author: nas at python.ca (Neil Schemenauer), tim.one at home.com (Tim Peters), magnus at hetland.org (Magnus Lie Hetland) -Discussion-To: python-iterators at lists.sourceforge.net +Discussions-To: python-iterators at lists.sourceforge.net Status: Final Type: Standards Track Requires: 234 Modified: peps/trunk/pep-0259.txt ============================================================================== --- peps/trunk/pep-0259.txt (original) +++ peps/trunk/pep-0259.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: guido at python.org (Guido van Rossum) Status: Rejected Type: Standards Track -Python-Version: 2.2 Created: 11-Jun-2001 +Python-Version: 2.2 Post-History: 11-Jun-2001 Abstract Modified: peps/trunk/pep-0260.txt ============================================================================== --- peps/trunk/pep-0260.txt (original) +++ peps/trunk/pep-0260.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: guido at python.org (Guido van Rossum) Status: Final Type: Standards Track -Python-Version: 2.2 Created: 26-Jun-2001 +Python-Version: 2.2 Post-History: 26-Jun-2001 Abstract Modified: peps/trunk/pep-0262.txt ============================================================================== --- peps/trunk/pep-0262.txt (original) +++ peps/trunk/pep-0262.txt Tue Jun 19 06:20:07 2007 @@ -3,9 +3,9 @@ Version: $Revision$ Last-Modified: $Date$ Author: A.M. Kuchling +Status: Deferred Type: Standards Track Created: 08-Jul-2001 -Status: Deferred Post-History: 27-Mar-2002 Introduction Modified: peps/trunk/pep-0263.txt ============================================================================== --- peps/trunk/pep-0263.txt (original) +++ peps/trunk/pep-0263.txt Tue Jun 19 06:20:07 2007 @@ -6,9 +6,8 @@ loewis at informatik.hu-berlin.de (Martin v. L?wis) Status: Final Type: Standards Track -Python-Version: 2.3 Created: 06-Jun-2001 -Last-Modified: +Python-Version: 2.3 Post-History: Abstract Modified: peps/trunk/pep-0266.txt ============================================================================== --- peps/trunk/pep-0266.txt (original) +++ peps/trunk/pep-0266.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: skip at pobox.com (Skip Montanaro) Status: Withdrawn Type: Standards Track -Python-Version: 2.3 Created: 13-Aug-2001 +Python-Version: 2.3 Post-History: Modified: peps/trunk/pep-0268.txt ============================================================================== --- peps/trunk/pep-0268.txt (original) +++ peps/trunk/pep-0268.txt Tue Jun 19 06:20:07 2007 @@ -5,10 +5,10 @@ Author: gstein at lyra.org (Greg Stein) Status: Rejected Type: Standards Track +Content-Type: text/x-rst Created: 20-Aug-2001 Python-Version: 2.x Post-History: 21-Aug-2001 -Content-Type: text/x-rst Rejection Notice Modified: peps/trunk/pep-0273.txt ============================================================================== --- peps/trunk/pep-0273.txt (original) +++ peps/trunk/pep-0273.txt Tue Jun 19 06:20:07 2007 @@ -6,8 +6,8 @@ Status: Final Type: Standards Track Created: 11-Oct-2001 -Post-History: 26-Oct-2001 Python-Version: 2.3 +Post-History: 26-Oct-2001 Abstract Modified: peps/trunk/pep-0275.txt ============================================================================== --- peps/trunk/pep-0275.txt (original) +++ peps/trunk/pep-0275.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: mal at lemburg.com (Marc-Andr? Lemburg) Status: Rejected Type: Standards Track -Python-Version: 2.6 Created: 10-Nov-2001 +Python-Version: 2.6 Post-History: Rejection Notice Modified: peps/trunk/pep-0281.txt ============================================================================== --- peps/trunk/pep-0281.txt (original) +++ peps/trunk/pep-0281.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Standards Track Created: 11-Feb-2002 Python-Version: 2.3 +Post-History: Abstract Modified: peps/trunk/pep-0291.txt ============================================================================== --- peps/trunk/pep-0291.txt (original) +++ peps/trunk/pep-0291.txt Tue Jun 19 06:20:07 2007 @@ -6,8 +6,8 @@ Status: Active Type: Informational Created: 06-Jun-2002 -Post-History: Python-Version: 2.3 +Post-History: Abstract Modified: peps/trunk/pep-0297.txt ============================================================================== --- peps/trunk/pep-0297.txt (original) +++ peps/trunk/pep-0297.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: mal at lemburg.com (Marc-Andr? Lemburg) Status: Rejected Type: Standards Track -Python-Version: 2.6 Created: 19-Jul-2001 +Python-Version: 2.6 Post-History: Rejection Notice Modified: peps/trunk/pep-0299.txt ============================================================================== --- peps/trunk/pep-0299.txt (original) +++ peps/trunk/pep-0299.txt Tue Jun 19 06:20:07 2007 @@ -6,7 +6,7 @@ Status: Rejected Type: Standards Track Created: 12-Aug-2002 -Python-version: 2.3 +Python-Version: 2.3 Post-History: 29-Mar-2006 Modified: peps/trunk/pep-0314.txt ============================================================================== --- peps/trunk/pep-0314.txt (original) +++ peps/trunk/pep-0314.txt Tue Jun 19 06:20:07 2007 @@ -5,7 +5,7 @@ Author: A.M. Kuchling, Richard Jones Status: Final Type: Standards Track -Content-type: text/plain +Content-Type: text/plain Created: 12-Apr-2003 Python-Version: 2.5 Post-History: 29-Apr-2003 Modified: peps/trunk/pep-0321.txt ============================================================================== --- peps/trunk/pep-0321.txt (original) +++ peps/trunk/pep-0321.txt Tue Jun 19 06:20:07 2007 @@ -6,8 +6,8 @@ Status: Withdrawn Type: Standards Track Content-Type: text/x-rst -Python-Version: 2.4 Created: 16-Sep-2003 +Python-Version: 2.4 Post-History: Modified: peps/trunk/pep-0324.txt ============================================================================== --- peps/trunk/pep-0324.txt (original) +++ peps/trunk/pep-0324.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,10 @@ Author: Peter Astrand Status: Final Type: Standards Track -Created: 19-Nov-2003 Content-Type: text/plain +Created: 19-Nov-2003 Python-Version: 2.4 +Post-History: Abstract Modified: peps/trunk/pep-0328.txt ============================================================================== --- peps/trunk/pep-0328.txt (original) +++ peps/trunk/pep-0328.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,9 @@ Author: Aahz Status: Final Type: Standards Track -Python-Version: 2.4, 2,5, 2.6, 2.7 Content-Type: text/x-rst Created: 21-Dec-2003 +Python-Version: 2.4, 2,5, 2.6, 2.7 Post-History: 8-Mar-2004 Modified: peps/trunk/pep-0334.txt ============================================================================== --- peps/trunk/pep-0334.txt (original) +++ peps/trunk/pep-0334.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,9 @@ Author: Clark C. Evans Status: Withdrawn Type: Standards Track -Python-Version: 3.0 Content-Type: text/x-rst Created: 26-Aug-2004 +Python-Version: 3.0 Post-History: Modified: peps/trunk/pep-0344.txt ============================================================================== --- peps/trunk/pep-0344.txt (original) +++ peps/trunk/pep-0344.txt Tue Jun 19 06:20:07 2007 @@ -8,6 +8,7 @@ Content-Type: text/plain Created: 12-May-2005 Python-Version: 2.5 +Post-History: Numbering Note Modified: peps/trunk/pep-0345.txt ============================================================================== --- peps/trunk/pep-0345.txt (original) +++ peps/trunk/pep-0345.txt Tue Jun 19 06:20:07 2007 @@ -6,7 +6,7 @@ Discussions-To: Distutils SIG Status: Draft Type: Standards Track -Content-type: text/x-rst +Content-Type: text/x-rst Created: 28-Apr-2005 Python-Version: 2.5 Post-History: Modified: peps/trunk/pep-0349.txt ============================================================================== --- peps/trunk/pep-0349.txt (original) +++ peps/trunk/pep-0349.txt Tue Jun 19 06:20:07 2007 @@ -7,8 +7,8 @@ Type: Standards Track Content-Type: text/plain Created: 02-Aug-2005 -Post-History: 06-Aug-2005 Python-Version: 2.5 +Post-History: 06-Aug-2005 Abstract Modified: peps/trunk/pep-0351.txt ============================================================================== --- peps/trunk/pep-0351.txt (original) +++ peps/trunk/pep-0351.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Standards Track Content-Type: text/x-rst Created: 14-Apr-2005 +Post-History: Abstract Modified: peps/trunk/pep-0355.txt ============================================================================== --- peps/trunk/pep-0355.txt (original) +++ peps/trunk/pep-0355.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,10 @@ Author: Bj?rn Lindqvist Status: Rejected Type: Standards Track -Created: 24-Jan-2006 Content-Type: text/plain +Created: 24-Jan-2006 Python-Version: 2.5 +Post-History: Rejection Notice Modified: peps/trunk/pep-0357.txt ============================================================================== --- peps/trunk/pep-0357.txt (original) +++ peps/trunk/pep-0357.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Standards Track Created: 09-Feb-2006 Python-Version: 2.5 +Post-History: Abstract Modified: peps/trunk/pep-0360.txt ============================================================================== --- peps/trunk/pep-0360.txt (original) +++ peps/trunk/pep-0360.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Informational Content-Type: text/x-rst Created: 30-May-2006 +Post-History: .. warning:: No new modules are to be added to this PEP. It has been Modified: peps/trunk/pep-0362.txt ============================================================================== --- peps/trunk/pep-0362.txt (original) +++ peps/trunk/pep-0362.txt Tue Jun 19 06:20:07 2007 @@ -6,9 +6,10 @@ Jiwon Seo Status: Draft Type: Standards Track -Python-Version: 2.6 Content-Type: text/x-rst Created: 21-Aug-2006 +Python-Version: 2.6 +Post-History: Abstract Modified: peps/trunk/pep-3001.txt ============================================================================== --- peps/trunk/pep-3001.txt (original) +++ peps/trunk/pep-3001.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Process Content-Type: text/x-rst Created: 05-Apr-2006 +Post-History: Abstract Modified: peps/trunk/pep-3099.txt ============================================================================== --- peps/trunk/pep-3099.txt (original) +++ peps/trunk/pep-3099.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Informational Content-Type: text/x-rst Created: 04-Apr-2006 +Post-History: Abstract Modified: peps/trunk/pep-3103.txt ============================================================================== --- peps/trunk/pep-3103.txt (original) +++ peps/trunk/pep-3103.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,9 @@ Author: guido at python.org (Guido van Rossum) Status: Rejected Type: Standards Track -Python-Version: 3.0 Content-Type: text/x-rst Created: 25-Jun-2006 +Python-Version: 3.0 Post-History: 26-Jun-2006 Modified: peps/trunk/pep-3104.txt ============================================================================== --- peps/trunk/pep-3104.txt (original) +++ peps/trunk/pep-3104.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,10 @@ Author: Ka-Ping Yee Status: Accepted Type: Standards Track -Python-Version: 3.0 Content-Type: text/x-rst Created: 12-Oct-2006 +Python-Version: 3.0 +Post-History: Abstract Modified: peps/trunk/pep-3105.txt ============================================================================== --- peps/trunk/pep-3105.txt (original) +++ peps/trunk/pep-3105.txt Tue Jun 19 06:20:07 2007 @@ -8,6 +8,7 @@ Content-Type: text/x-rst Created: 19-Nov-2006 Python-Version: 3.0 +Post-History: Abstract Modified: peps/trunk/pep-3107.txt ============================================================================== --- peps/trunk/pep-3107.txt (original) +++ peps/trunk/pep-3107.txt Tue Jun 19 06:20:07 2007 @@ -6,8 +6,8 @@ Tony Lownds Status: Accepted Type: Standards Track -Requires: 362 Content-Type: text/x-rst +Requires: 362 Created: 2-Dec-2006 Python-Version: 3.0 Post-History: Modified: peps/trunk/pep-3108.txt ============================================================================== --- peps/trunk/pep-3108.txt (original) +++ peps/trunk/pep-3108.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,9 @@ Author: Brett Cannon Status: Draft Type: Standards Track -Python-Version: 3.0 Content-Type: text/x-rst Created: 01-Jan-2007 +Python-Version: 3.0 Post-History: Modified: peps/trunk/pep-3113.txt ============================================================================== --- peps/trunk/pep-3113.txt (original) +++ peps/trunk/pep-3113.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,10 @@ Author: Brett Cannon Status: Final Type: Standards Track -Python-version: 3.0 Content-Type: text/x-rst Created: 02-Mar-2007 +Python-Version: 3.0 +Post-History: Abstract Modified: peps/trunk/pep-3114.txt ============================================================================== --- peps/trunk/pep-3114.txt (original) +++ peps/trunk/pep-3114.txt Tue Jun 19 06:20:07 2007 @@ -5,9 +5,10 @@ Author: Ka-Ping Yee Status: Final Type: Standards Track -Python-version: 3.0 Content-Type: text/x-rst Created: 04-Mar-2007 +Python-Version: 3.0 +Post-History: Abstract Modified: peps/trunk/pep-3116.txt ============================================================================== --- peps/trunk/pep-3116.txt (original) +++ peps/trunk/pep-3116.txt Tue Jun 19 06:20:07 2007 @@ -5,10 +5,10 @@ Author: Daniel Stutzbach, Mike Verdone, Guido van Rossum Status: Draft Type: Standards Track -Content-type: text/x-rst +Content-Type: text/x-rst Created: 26-Feb-2007 -Post-History: 26-Feb-2007 Python-Version: 3.0 +Post-History: 26-Feb-2007 Rationale and Goals =================== Modified: peps/trunk/pep-3117.txt ============================================================================== --- peps/trunk/pep-3117.txt (original) +++ peps/trunk/pep-3117.txt Tue Jun 19 06:20:07 2007 @@ -8,6 +8,7 @@ Content-Type: text/x-rst Created: 01-Apr-2007 Python-Version: 3.0 +Post-History: Abstract Modified: peps/trunk/pep-3118.txt ============================================================================== --- peps/trunk/pep-3118.txt (original) +++ peps/trunk/pep-3118.txt Tue Jun 19 06:20:07 2007 @@ -8,6 +8,7 @@ Content-Type: text/x-rst Created: 28-Aug-2006 Python-Version: 3000 +Post-History: Abstract ======== Modified: peps/trunk/pep-3122.txt ============================================================================== --- peps/trunk/pep-3122.txt (original) +++ peps/trunk/pep-3122.txt Tue Jun 19 06:20:07 2007 @@ -7,6 +7,7 @@ Type: Standards Track Content-Type: text/x-rst Created: 27-Apr-2007 +Post-History: .. attention:: This PEP has been rejected. Guido views running scripts within a Modified: peps/trunk/pep-3124.txt ============================================================================== --- peps/trunk/pep-3124.txt (original) +++ peps/trunk/pep-3124.txt Tue Jun 19 06:20:07 2007 @@ -6,11 +6,11 @@ Discussions-To: Python 3000 List Status: Draft Type: Standards Track -Requires: 3107, 3115, 3119 -Replaces: 245, 246 Content-Type: text/x-rst +Requires: 3107, 3115, 3119 Created: 28-Apr-2007 Post-History: 30-Apr-2007 +Replaces: 245, 246 Abstract Modified: peps/trunk/pep-3127.txt ============================================================================== --- peps/trunk/pep-3127.txt (original) +++ peps/trunk/pep-3127.txt Tue Jun 19 06:20:07 2007 @@ -6,9 +6,9 @@ Discussions-To: Python-3000 at python.org Status: Accepted Type: Standards Track -Python-Version: 3.0 Content-Type: text/x-rst Created: 14-Mar-2007 +Python-Version: 3.0 Post-History: 18-Mar-2007 Modified: peps/trunk/pep-3133.txt ============================================================================== --- peps/trunk/pep-3133.txt (original) +++ peps/trunk/pep-3133.txt Tue Jun 19 06:20:07 2007 @@ -5,8 +5,8 @@ Author: Collin Winter Status: Rejected Type: Standards Track -Requires: 3115, 3129 Content-Type: text/x-rst +Requires: 3115, 3129 Created: 1-May-2007 Python-Version: 3.0 Post-History: 13-May-2007 Modified: peps/trunk/pep-3134.txt ============================================================================== --- peps/trunk/pep-3134.txt (original) +++ peps/trunk/pep-3134.txt Tue Jun 19 06:20:07 2007 @@ -8,6 +8,7 @@ Content-Type: text/plain Created: 12-May-2005 Python-Version: 3.0 +Post-History: Numbering Note From python-checkins at python.org Tue Jun 19 06:22:34 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 06:22:34 +0200 (CEST) Subject: [Python-checkins] r56034 - sandbox/trunk/pep0/pep0/__init__.py sandbox/trunk/pep0/pep0/parse.py sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070619042234.A12721E4007@bag.python.org> Author: brett.cannon Date: Tue Jun 19 06:22:32 2007 New Revision: 56034 Removed: sandbox/trunk/pep0/pep0/parse.py Modified: sandbox/trunk/pep0/pep0/__init__.py sandbox/trunk/pep0/pep0/pep.py Log: Move parsing of headers into the PEP class. Also shift the constructor over to taking an open file instead of a dictionary. That allows for the removal of pep0.parse. All of this led to the verification that headers were in the proper order and that no required headers were missing. Modified: sandbox/trunk/pep0/pep0/__init__.py ============================================================================== --- sandbox/trunk/pep0/pep0/__init__.py (original) +++ sandbox/trunk/pep0/pep0/__init__.py Tue Jun 19 06:22:32 2007 @@ -13,22 +13,38 @@ 3. Output the PEP (both by category and numerical index). """ -from __future__ import absolute_import +from __future__ import absolute_import, with_statement if __name__ == '__main__': - from pep0.parse import consume_directory, consume_pep from pep0.output import write_pep0 + from pep0.pep import PEP - from os.path import isdir + from operator import attrgetter + import os.path from sys import argv, stdout if not argv[1:]: path = '.' else: path = argv[1] - if isdir(path): - peps = consume_directory(path) + + peps = [] + if os.path.isdir(path): + for file_path in os.listdir(path): + abs_file_path = os.path.join(path, file_path) + if not os.path.isfile(abs_file_path): + continue + if (not file_path.startswith('pep-') or + not file_path.endswith('.txt')): + continue + with open(abs_file_path, 'r') as pep_file: + peps.append(PEP(pep_file)) + else: + peps.sort(key=attrgetter('number')) + elif os.path.isfile(path): + with open(path, 'r') as pep_file: + peps.append(PEP(pep_file)) else: - peps = [consume_pep(path)] + raise ValueError("argument must be a directory or file path") write_pep0(peps) Deleted: /sandbox/trunk/pep0/pep0/parse.py ============================================================================== --- /sandbox/trunk/pep0/pep0/parse.py Tue Jun 19 06:22:32 2007 +++ (empty file) @@ -1,86 +0,0 @@ -"""Parse the metadata from a PEP file. - -Parsing consists of several steps: - - * Detecting and reading all lines of text relating to metadata. - * Concatenating multi-line metadata for a single field into a single line. - * Validate PEP number (needed for future error reporting). - + Must be an integer. - + Must match file name. - -""" -from __future__ import with_statement -from .pep import PEP - -from operator import attrgetter -import os - -def consume_directory(directory): - """Pull out metadata for every PEP in the specified directory and return - them in a list sorted by PEP name. - - The PEP file name must start with 'pep-' and end with '.txt' to be - considered. - - """ - peps = [] - for file_name in os.listdir(directory): - if file_name.startswith('pep-') and file_name.endswith('.txt'): - peps.append(consume_pep(os.path.join(directory, file_name))) - peps.sort(key=attrgetter('number')) - return peps - -def consume_pep(path): - """Consume the specified file as a PEP to get its metadata.""" - metadata = {} - field = None - with open(path, 'rU') as pep_file: - try: - for line in pep_file: - if line == '\n': - # Found end of metadata. - break - elif line[0].isspace(): - assert field is not None - # Whitespace indent signifies multi-line field data. - field, data = split_metadata(line, field) - else: - field, data = split_metadata(line) - prev_data = metadata.get(field) - if prev_data: - data = metadata[field] + data - metadata[field] = data - except Exception: - raise - # Make sure PEP field was found ... - if not 'PEP' in metadata: - raise ValueError("PEP at file %s lacks a PEP number" % path) - # ... it matches the file name in some way ... - if metadata['PEP'] not in path: - raise ValueError("PEP number in file %s does not match number " - "specified in its file name" % path) - # ... and that the number is a valid integer. - try: - metadata['PEP'] = int(metadata['PEP']) - except ValueError: - raise ValueError("PEP number in file %s is not valid" % path) - return PEP(metadata) - -def split_metadata(line, continue_field=None): - """Parse the given line for PEP metadata, returning the field and data for - the line parsed. - - If continue_field is specified then return that as the field parsed. - - """ - if continue_field: - field = continue_field - data = line - else: - try: - field, data = line.split(':', 1) - except ValueError: - raise ValueError("could not find field in %r" % line) - field = field.strip() - data = data.strip() - return field, data Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Tue Jun 19 06:22:32 2007 @@ -28,7 +28,19 @@ A list of the authors' full names. """ + # The various RFC 822 headers that are supported. + # The second item in the nested tuples represents if the header is + # required or not. + headers = (('PEP', True), ('Title', True), ('Version', True), + ('Last-Modified', True), ('Author', True), + ('Discussions-To', False), ('Status', True), ('Type', True), + ('Content-Type', False), ('Requires', False), + ('Created', True), ('Python-Version', False), + ('Post-History', True), ('Replaces', False), + ('Replaced-By', False)) + # Valid values for the Type header. type_values = ("Standards Track", "Informational", "Process") + # Valid values for the Status header. # Active PEPs can only be for Informational or Process PEPs. status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", "Active", "Draft", "Replaced") @@ -36,48 +48,68 @@ # XXX Uncomment to valid author names (along with code in __init__). #valid_authors = set(x[0] for x in constants.email_addresses) - # XXX Take in an open file. - # XXX Parse header metadata (verify order and that all required fields - # exist). - def __init__(self, metadata_dict): - """Init object based on dict containing metadata from a file. - - Required keys from metadata_dict are: - - * PEP - Value must be an integer. - - * Title - A string. - - * Type - Value must match a value in self.type_values. - - * Status - Value must match a value in self.status_values. - - * Author - Value must have at least one author in the string as returned - by self.parse_author. - - """ - # Verify keys exist. - for required_key in ('PEP', 'Title', 'Type', 'Status', 'Author'): - if required_key not in metadata_dict: - raise KeyError("required key %r not in dict") - # 'PEP'. PEP parsing should have already converted the number to an - # integer, so just being safe here. - self.number = int(metadata_dict['PEP']) + + def __init__(self, pep_file): + """Init object from an open PEP file object.""" + # Parse the headers. + metadata = {} + header_name = None + header_field_iter = iter(self.headers) + try: + while True: + header_line = pep_file.readline() + if header_line == '\n': + break + elif header_line.startswith(' '): + existing_data = metadata[header_name] + metadata[header_name] = existing_data + header_line.strip() + continue + else: + header_name, data = header_line.split(':', 1) + header_name = header_name.strip() + data = data.strip() + expected_header, required = header_field_iter.next() + try: + while header_name != expected_header: + if required: + err_msg = ("The PEP at %s did not handle the " + "%s header before needing to " + "handle the %s header") + raise ValueError(err_msg % (pep_file.name, + header_name, + expected_header)) + else: + expected_header, required = header_field_iter.next() + metadata[header_name] = data + except StopIteration: + raise ValueError("the PEP at %s had the %s header unhandled " + "(something out of order?)" % + (pep_file.name, header_name)) + else: + raise ValueError('no body to the PEP at %s' % pep_file.name) + except StopIteration: + raise ValueError("no body to the PEP at %s" % pep_file.name) + else: + try: + required = False + while not required: + expected_header, required = header_field_iter.next() + raise ValueError("the PEP at %s is missing the %s header" % + (pep_file.name, expected_header)) + except StopIteration: + pass + # 'PEP'. + self.number = int(metadata['PEP']) # 'Title'. - self.title = metadata_dict['Title'] + self.title = metadata['Title'] # 'Type'. - type_ = metadata_dict['Type'] + type_ = metadata['Type'] if type_ not in self.type_values: raise ValueError('%r is not a valid Type value (PEP %s)' % (type_, self.number)) self.type_ = type_ # 'Status'. - status = metadata_dict['Status'] + status = metadata['Status'] if status not in self.status_values: raise ValueError("%r is not a valid Status value (PEP %s)" % (status, self.number)) @@ -88,7 +120,7 @@ "Active status (PEP %s)" % self.number) self.status = status # 'Author'. - authors = self._parse_author(metadata_dict['Author']) + authors = self._parse_author(metadata['Author']) # XXX Uncomment (plus valid_authors) to validate author names. #for author in authors: # if author not in self.valid_authors: @@ -97,6 +129,7 @@ raise ValueError("no authors found (PEP %s)" % self.number) self.authors = authors + def _parse_author(self, data): """Return a list of author names.""" # XXX Consider using email.utils.parseaddr (doesn't work with names From python-checkins at python.org Tue Jun 19 06:26:38 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 06:26:38 +0200 (CEST) Subject: [Python-checkins] r56035 - peps/trunk/pep-0001.txt Message-ID: <20070619042638.DD7EF1E4007@bag.python.org> Author: brett.cannon Date: Tue Jun 19 06:26:23 2007 New Revision: 56035 Modified: peps/trunk/pep-0001.txt Log: Add the missing "Withdrawn" status as acceptable. Modified: peps/trunk/pep-0001.txt ============================================================================== --- peps/trunk/pep-0001.txt (original) +++ peps/trunk/pep-0001.txt Tue Jun 19 06:26:23 2007 @@ -261,7 +261,7 @@ Author: * Discussions-To: Status: + Withdrawn | Final | Replaced> Type: * Content-Type: * Requires: From python-checkins at python.org Tue Jun 19 06:52:36 2007 From: python-checkins at python.org (brett.cannon) Date: Tue, 19 Jun 2007 06:52:36 +0200 (CEST) Subject: [Python-checkins] r56036 - peps/trunk/pep-0000.txt peps/trunk/pep-0001.txt peps/trunk/pep-0002.txt peps/trunk/pep-0003.txt peps/trunk/pep-0004.txt peps/trunk/pep-0005.txt peps/trunk/pep-0007.txt peps/trunk/pep-0008.txt peps/trunk/pep-0009.txt peps/trunk/pep-0010.txt peps/trunk/pep-0011.txt peps/trunk/pep-0012.txt peps/trunk/pep-3099.txt Message-ID: <20070619045236.23C821E4007@bag.python.org> Author: brett.cannon Date: Tue Jun 19 06:52:34 2007 New Revision: 56036 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0001.txt peps/trunk/pep-0002.txt peps/trunk/pep-0003.txt peps/trunk/pep-0004.txt peps/trunk/pep-0005.txt peps/trunk/pep-0007.txt peps/trunk/pep-0008.txt peps/trunk/pep-0009.txt peps/trunk/pep-0010.txt peps/trunk/pep-0011.txt peps/trunk/pep-0012.txt peps/trunk/pep-3099.txt Log: Make all meta-PEPs be Process PEPs. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Tue Jun 19 06:52:34 2007 @@ -5,7 +5,7 @@ Author: David Goodger , Barry A. Warsaw Status: Active -Type: Informational +Type: Process Created: 13-Jul-2000 Post-History: @@ -25,24 +25,24 @@ Meta-PEPs (PEPs about PEPs or Process) - I 0 Index of Python Enhancement Proposals Goodger, Warsaw + P 0 Index of Python Enhancement Proposals Goodger, Warsaw P 1 PEP Purpose and Guidelines Warsaw, Hylton, Goodger - I 2 Procedure for Adding New Modules Faassen - I 3 Guidelines for Handling Bug Reports Hylton - I 4 Deprecation of Standard Modules von Loewis - I 5 Guidelines for Language Evolution Prescod + P 2 Procedure for Adding New Modules Faassen + P 3 Guidelines for Handling Bug Reports Hylton + P 4 Deprecation of Standard Modules von Loewis + P 5 Guidelines for Language Evolution Prescod P 6 Bug Fix Releases Aahz - I 7 Style Guide for C Code GvR - I 8 Style Guide for Python Code GvR, Warsaw - I 9 Sample Plaintext PEP Template Warsaw - I 10 Voting Guidelines Warsaw - I 11 Removing support for little used platforms von Loewis - I 12 Sample reStructuredText PEP Template Goodger, Warsaw + P 7 Style Guide for C Code GvR + P 8 Style Guide for Python Code GvR, Warsaw + P 9 Sample Plaintext PEP Template Warsaw + P 10 Voting Guidelines Warsaw + P 11 Removing support for little used platforms von Loewis + P 12 Sample reStructuredText PEP Template Goodger, Warsaw P 347 Migrating the Python CVS to Subversion von L?wis P 3000 Python 3000 GvR P 3001 Reviewing and improving stdlib modules Brandl P 3002 Procedure for Backwards-Incompatible Changes Bethard - I 3099 Things that will Not Change in Python 3000 Brandl + P 3099 Things that will Not Change in Python 3000 Brandl Other Informational PEPs Modified: peps/trunk/pep-0001.txt ============================================================================== --- peps/trunk/pep-0001.txt (original) +++ peps/trunk/pep-0001.txt Tue Jun 19 06:52:34 2007 @@ -54,7 +54,7 @@ are typically not free to ignore them. Examples include release schedules, procedures, guidelines, changes to the decision-making process, and changes to the tools or environment used in Python - development. + development. Any meta-PEP is also considered a Process PEP. PEP Work Flow Modified: peps/trunk/pep-0002.txt ============================================================================== --- peps/trunk/pep-0002.txt (original) +++ peps/trunk/pep-0002.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: faassen at infrae.com (Martijn Faassen) Status: Draft -Type: Informational +Type: Process Created: 07-Jul-2001 Post-History: 07-Jul-2001, 09-Mar-2002 Modified: peps/trunk/pep-0003.txt ============================================================================== --- peps/trunk/pep-0003.txt (original) +++ peps/trunk/pep-0003.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: jeremy at alum.mit.edu (Jeremy Hylton) Status: Active -Type: Informational +Type: Process Created: 25-Sep-2000 Post-History: Modified: peps/trunk/pep-0004.txt ============================================================================== --- peps/trunk/pep-0004.txt (original) +++ peps/trunk/pep-0004.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: Martin v. Loewis Status: Active -Type: Informational +Type: Process Created: 1-Oct-2000 Post-History: Modified: peps/trunk/pep-0005.txt ============================================================================== --- peps/trunk/pep-0005.txt (original) +++ peps/trunk/pep-0005.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: paul at prescod.net (Paul Prescod) Status: Active -Type: Informational +Type: Process Created: 26-Oct-2000 Post-History: Modified: peps/trunk/pep-0007.txt ============================================================================== --- peps/trunk/pep-0007.txt (original) +++ peps/trunk/pep-0007.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: guido at python.org (Guido van Rossum) Status: Active -Type: Informational +Type: Process Created: 05-Jul-2001 Post-History: Modified: peps/trunk/pep-0008.txt ============================================================================== --- peps/trunk/pep-0008.txt (original) +++ peps/trunk/pep-0008.txt Tue Jun 19 06:52:34 2007 @@ -5,7 +5,7 @@ Author: guido at python.org (Guido van Rossum), barry at python.org (Barry Warsaw) Status: Active -Type: Informational +Type: Process Created: 05-Jul-2001 Post-History: 05-Jul-2001 Modified: peps/trunk/pep-0009.txt ============================================================================== --- peps/trunk/pep-0009.txt (original) +++ peps/trunk/pep-0009.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: Barry A. Warsaw Status: Active -Type: Informational +Type: Process Content-Type: text/plain Created: 14-Aug-2001 Post-History: Modified: peps/trunk/pep-0010.txt ============================================================================== --- peps/trunk/pep-0010.txt (original) +++ peps/trunk/pep-0010.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: barry at python.org (Barry A. Warsaw) Status: Active -Type: Informational +Type: Process Created: 07-Mar-2002 Post-History: 07-Mar-2002 Modified: peps/trunk/pep-0011.txt ============================================================================== --- peps/trunk/pep-0011.txt (original) +++ peps/trunk/pep-0011.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: martin at v.loewis.de (Martin v. L?wis) Status: Active -Type: Informational +Type: Process Created: 07-Jul-2002 Post-History: 07-Jul-2002 Modified: peps/trunk/pep-0012.txt ============================================================================== --- peps/trunk/pep-0012.txt (original) +++ peps/trunk/pep-0012.txt Tue Jun 19 06:52:34 2007 @@ -5,7 +5,7 @@ Author: David Goodger , Barry A. Warsaw Status: Active -Type: Informational +Type: Process Content-Type: text/x-rst Created: 05-Aug-2002 Post-History: 30-Aug-2002 Modified: peps/trunk/pep-3099.txt ============================================================================== --- peps/trunk/pep-3099.txt (original) +++ peps/trunk/pep-3099.txt Tue Jun 19 06:52:34 2007 @@ -4,7 +4,7 @@ Last-Modified: $Date$ Author: Georg Brandl Status: Draft -Type: Informational +Type: Process Content-Type: text/x-rst Created: 04-Apr-2006 Post-History: From python-checkins at python.org Tue Jun 19 14:36:02 2007 From: python-checkins at python.org (georg.brandl) Date: Tue, 19 Jun 2007 14:36:02 +0200 (CEST) Subject: [Python-checkins] r56038 - python/trunk/Lib/logging/__init__.py Message-ID: <20070619123602.694721E4014@bag.python.org> Author: georg.brandl Date: Tue Jun 19 14:36:00 2007 New Revision: 56038 Modified: python/trunk/Lib/logging/__init__.py Log: Bug #1737864: allow empty message in logging format routines. Modified: python/trunk/Lib/logging/__init__.py ============================================================================== --- python/trunk/Lib/logging/__init__.py (original) +++ python/trunk/Lib/logging/__init__.py Tue Jun 19 14:36:00 2007 @@ -398,7 +398,7 @@ traceback.print_exception(ei[0], ei[1], ei[2], None, sio) s = sio.getvalue() sio.close() - if s[-1] == "\n": + if s[-1:] == "\n": s = s[:-1] return s @@ -425,7 +425,7 @@ if not record.exc_text: record.exc_text = self.formatException(record.exc_info) if record.exc_text: - if s[-1] != "\n": + if s[-1:] != "\n": s = s + "\n" s = s + record.exc_text return s From python-checkins at python.org Tue Jun 19 14:36:08 2007 From: python-checkins at python.org (georg.brandl) Date: Tue, 19 Jun 2007 14:36:08 +0200 (CEST) Subject: [Python-checkins] r56039 - python/branches/release25-maint/Lib/logging/__init__.py Message-ID: <20070619123608.5D9AE1E4002@bag.python.org> Author: georg.brandl Date: Tue Jun 19 14:36:06 2007 New Revision: 56039 Modified: python/branches/release25-maint/Lib/logging/__init__.py Log: Bug #1737864: allow empty message in logging format routines. (backport from rev. 56038) Modified: python/branches/release25-maint/Lib/logging/__init__.py ============================================================================== --- python/branches/release25-maint/Lib/logging/__init__.py (original) +++ python/branches/release25-maint/Lib/logging/__init__.py Tue Jun 19 14:36:06 2007 @@ -398,7 +398,7 @@ traceback.print_exception(ei[0], ei[1], ei[2], None, sio) s = sio.getvalue() sio.close() - if s[-1] == "\n": + if s[-1:] == "\n": s = s[:-1] return s @@ -425,7 +425,7 @@ if not record.exc_text: record.exc_text = self.formatException(record.exc_info) if record.exc_text: - if s[-1] != "\n": + if s[-1:] != "\n": s = s + "\n" s = s + record.exc_text return s From python-checkins at python.org Tue Jun 19 14:38:22 2007 From: python-checkins at python.org (georg.brandl) Date: Tue, 19 Jun 2007 14:38:22 +0200 (CEST) Subject: [Python-checkins] r56040 - python/trunk/Doc/lib/libshutil.tex Message-ID: <20070619123822.B94321E4010@bag.python.org> Author: georg.brandl Date: Tue Jun 19 14:38:20 2007 New Revision: 56040 Modified: python/trunk/Doc/lib/libshutil.tex Log: Bug #1739115: make shutil.rmtree docs clear wrt. file deletion. Modified: python/trunk/Doc/lib/libshutil.tex ============================================================================== --- python/trunk/Doc/lib/libshutil.tex (original) +++ python/trunk/Doc/lib/libshutil.tex Tue Jun 19 14:38:20 2007 @@ -91,11 +91,12 @@ \end{funcdesc} \begin{funcdesc}{rmtree}{path\optional{, ignore_errors\optional{, onerror}}} - Delete an entire directory tree.\index{directory!deleting} - If \var{ignore_errors} is true, - errors resulting from failed removals will be ignored; if false or - omitted, such errors are handled by calling a handler specified by - \var{onerror} or, if that is omitted, they raise an exception. + \index{directory!deleting} + Delete an entire directory tree (\var{path} must point to a directory). + If \var{ignore_errors} is true, errors resulting from failed removals + will be ignored; if false or omitted, such errors are handled by + calling a handler specified by \var{onerror} or, if that is omitted, + they raise an exception. If \var{onerror} is provided, it must be a callable that accepts three parameters: \var{function}, \var{path}, and \var{excinfo}. From python-checkins at python.org Tue Jun 19 14:38:27 2007 From: python-checkins at python.org (georg.brandl) Date: Tue, 19 Jun 2007 14:38:27 +0200 (CEST) Subject: [Python-checkins] r56041 - python/branches/release25-maint/Doc/lib/libshutil.tex Message-ID: <20070619123827.DFDF01E4011@bag.python.org> Author: georg.brandl Date: Tue Jun 19 14:38:26 2007 New Revision: 56041 Modified: python/branches/release25-maint/Doc/lib/libshutil.tex Log: Bug #1739115: make shutil.rmtree docs clear wrt. file deletion. (backport from rev. 56040) Modified: python/branches/release25-maint/Doc/lib/libshutil.tex ============================================================================== --- python/branches/release25-maint/Doc/lib/libshutil.tex (original) +++ python/branches/release25-maint/Doc/lib/libshutil.tex Tue Jun 19 14:38:26 2007 @@ -91,11 +91,12 @@ \end{funcdesc} \begin{funcdesc}{rmtree}{path\optional{, ignore_errors\optional{, onerror}}} - Delete an entire directory tree.\index{directory!deleting} - If \var{ignore_errors} is true, - errors resulting from failed removals will be ignored; if false or - omitted, such errors are handled by calling a handler specified by - \var{onerror} or, if that is omitted, they raise an exception. + \index{directory!deleting} + Delete an entire directory tree (\var{path} must point to a directory). + If \var{ignore_errors} is true, errors resulting from failed removals + will be ignored; if false or omitted, such errors are handled by + calling a handler specified by \var{onerror} or, if that is omitted, + they raise an exception. If \var{onerror} is provided, it must be a callable that accepts three parameters: \var{function}, \var{path}, and \var{excinfo}. From python-checkins at python.org Wed Jun 20 06:21:31 2007 From: python-checkins at python.org (guido.van.rossum) Date: Wed, 20 Jun 2007 06:21:31 +0200 (CEST) Subject: [Python-checkins] r56042 - peps/trunk/pep-0358.txt Message-ID: <20070620042131.2CEB51E400D@bag.python.org> Author: guido.van.rossum Date: Wed Jun 20 06:21:24 2007 New Revision: 56042 Modified: peps/trunk/pep-0358.txt Log: Fix my email. Modified: peps/trunk/pep-0358.txt ============================================================================== --- peps/trunk/pep-0358.txt (original) +++ peps/trunk/pep-0358.txt Wed Jun 20 06:21:24 2007 @@ -2,7 +2,7 @@ Title: The "bytes" Object Version: $Revision$ Last-Modified: $Date$ -Author: Neil Schemenauer , Guido van Rossum +Author: Neil Schemenauer , Guido van Rossum Status: Accepted Type: Standards Track Content-Type: text/plain From python-checkins at python.org Wed Jun 20 14:20:06 2007 From: python-checkins at python.org (facundo.batista) Date: Wed, 20 Jun 2007 14:20:06 +0200 (CEST) Subject: [Python-checkins] r56045 - python/branches/decimal-branch/Lib/decimal.py Message-ID: <20070620122006.B2D901E4002@bag.python.org> Author: facundo.batista Date: Wed Jun 20 14:20:04 2007 New Revision: 56045 Modified: python/branches/decimal-branch/Lib/decimal.py Log: Coded canonical, maxmag and minmag methods. All tests pass ok. Modified: python/branches/decimal-branch/Lib/decimal.py ============================================================================== --- python/branches/decimal-branch/Lib/decimal.py (original) +++ python/branches/decimal-branch/Lib/decimal.py Wed Jun 20 14:20:04 2007 @@ -2315,6 +2315,7 @@ As we do not have different encodings for the same number, the received object already is in it's canonical form. """ + return self def compare_signal(self, other, context=None): """Compares self to the other operand numerically. @@ -2530,9 +2531,69 @@ def max_mag(self, other, context=None): """Compares the values numerically with their sign ignored.""" + if context is None: + context = getcontext() + if self._isnan() == 2: + return context._raise_error(InvalidOperation, 'Magnitude max with sNaN', 1, self) + if other._isnan() == 2: + return context._raise_error(InvalidOperation, 'Magnitude max with sNaN', 1, other) + abs_self = abs(self) + abs_other = abs(other) + if abs_self == abs_other: + if self._sign == other._sign: + if self._sign == 0: + if self._exp >= other._exp: + return self + else: + return other + else: + if self._exp < other._exp: + return self + else: + return other + elif self._sign == 0: + return self + else: + return other + ans = abs_self.max(abs_other) + if abs_self is ans: + d = self._fix(context) + else: + d = other._fix(context) + return d def min_mag(self, other, context=None): """Compares the values numerically with their sign ignored.""" + if context is None: + context = getcontext() + if self._isnan() == 2: + return context._raise_error(InvalidOperation, 'Magnitude max with sNaN', 1, self) + if other._isnan() == 2: + return context._raise_error(InvalidOperation, 'Magnitude max with sNaN', 1, other) + abs_self = abs(self) + abs_other = abs(other) + if abs_self == abs_other: + if self._sign == other._sign: + if self._sign == 0: + if self._exp >= other._exp: + return other + else: + return self + else: + if self._exp < other._exp: + return other + else: + return self + elif self._sign == 0: + return other + else: + return self + ans = abs_self.min(abs_other) + if abs_self is ans: + d = self._fix(context) + else: + d = other._fix(context) + return d def next_minus(self, context=None): """Returns the largest representable number smaller than itself.""" From python-checkins at python.org Wed Jun 20 17:35:20 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 17:35:20 +0200 (CEST) Subject: [Python-checkins] r56050 - peps/trunk/pep-3100.txt Message-ID: <20070620153520.559491E4008@bag.python.org> Author: brett.cannon Date: Wed Jun 20 17:35:13 2007 New Revision: 56050 Modified: peps/trunk/pep-3100.txt Log: Make my email address be consistent. Modified: peps/trunk/pep-3100.txt ============================================================================== --- peps/trunk/pep-3100.txt (original) +++ peps/trunk/pep-3100.txt Wed Jun 20 17:35:13 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: A.M. Kuchling , - Brett Cannon + Brett Cannon Status: Draft Type: Informational Content-Type: text/x-rst From python-checkins at python.org Wed Jun 20 18:55:13 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 18:55:13 +0200 (CEST) Subject: [Python-checkins] r56051 - sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070620165513.5E6A91E4009@bag.python.org> Author: brett.cannon Date: Wed Jun 20 18:55:09 2007 New Revision: 56051 Modified: sandbox/trunk/pep0/pep0/constants.py sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Log: Do not statically list authors' names in pep0.constants. Instead extract them from the PEPs directly. Also verify that an author uses only a single email address. This all lead to the creation of an Author class. Do need to rework the parsing code, though, to use email.parser instead of doing it by hand. Modified: sandbox/trunk/pep0/pep0/constants.py ============================================================================== --- sandbox/trunk/pep0/pep0/constants.py (original) +++ sandbox/trunk/pep0/pep0/constants.py Wed Jun 20 18:55:09 2007 @@ -38,112 +38,3 @@ fill-column: 70 coding: utf-8 End:""" - -nicknames = { - 'Guido van Rossum' : 'GvR', - 'Just van Rossum' : 'JvR', -} - -# Keep alphabetized! -email_addresses = ( - ('Aahz' , 'aahz at pobox.com'), - ('James C. Ahlstrom' , 'jim at interet.com'), - ('Jim Althoff' , 'james_althoff at i2.com'), - ('Kevin Altis' , 'altis at semi-retired.com'), - ('David Ascher' , 'davida at activestate.com'), - ('Peter Astrand' , 'astrand at lysator.liu.se'), - ('Carl Banks' , 'pythondev at aerojockey.com'), - ('Paul Barrett' , 'barrett at stsci.edu'), - ('Facundo Batista' , 'facundo at taniquetil.com.ar'), - ('Anthony Baxter' , 'anthony at interlink.com.au'), - ('Thomas Bellman' , 'bellman+pep-divmod at lysator.liu.se'), - ('Steven Bethard' , 'steven.bethard at gmail.com'), - ('Georg Brandl' , 'g.brandl at gmx.net'), - ('Brett Cannon' , 'brett at python.org'), - ('Josiah Carlson' , 'jcarlson at uci.edu'), - ('W Isaac Carroll' , 'icarroll at pobox.com'), - ('Nick Coghlan' , 'ncoghlan at gmail.com'), - ('Dave Cole' , 'djc at object-craft.com.au'), - ('Christopher Craig' , 'python-pep at ccraig.org'), - ('Laura Creighton' , 'lac at strakt.com'), - ('Walter D?rwald' , ''), - ('Fred L. Drake, Jr.' , 'fdrake at acm.org'), - ('Michael P. Dubner' , 'dubnerm at mindless.com'), - ('Paul F. Dubois' , 'paul at pfdubois.com'), - ('Phillip J. Eby' , 'pje at telecommunity.com'), - ('Micah Elliott' , 'mde at tracos.org'), - ('Jeff Epler' , 'jepler at unpythonic.net'), - ('David Eppstein' , 'eppstein at ics.uci.edu'), - ('Clark C. Evans' , 'cce at clarkevans.com'), - ('Greg Ewing' , 'greg at cosc.canterbury.ac.nz'), - ('Martijn Faassen' , 'faassen at infrae.com'), - ('Ben Finney' , 'ben+python at benfinney.id.au'), - ('Fr?d?ric B. Giacometti' , 'fred at arakne.com'), - ('Scott Gilbert' , 'xscottg at yahoo.com'), - ('David Goodger' , 'goodger at python.org'), - ('Grant Griffin' , 'g2 at iowegian.com'), - ('Mark Hammond' , 'mhammond at skippinet.com.au'), - ('Peter Harris' , 'scav at blueyonder.co.uk'), - ('Thomas Heller' , 'theller at python.net'), - ('Magnus Lie Hetland' , 'magnus at hetland.org'), - ('Raymond D. Hettinger' , 'python at rcn.com'), - ('Neil Hodgson' , 'neilh at scintilla.org'), - ('Michael Hudson' , 'mwh at python.net'), - ('Jeremy Hylton' , 'jeremy at zope.com'), - ('Jack Jansen' , 'jack at cwi.nl'), - ('Jim Jewett' , 'jimjjewett at users.sourceforge.net'), - ('Richard Jones' , 'richard at mechanicalcat.net'), - ('Stepan Koltsov' , 'yozh at mx1.ru'), - ('A.M. Kuchling' , 'amk at amk.ca'), - ('Marc-Andre Lemburg' , 'mal at lemburg.com'), - ('Gregory Lielens' , 'gregory.lielens at fft.be'), - ('Bj?rn Lindqvist' , 'bjourne at gmail.com'), - ('Martin von L?wis' , 'loewis at informatik.hu-berlin.de'), - ('Tony Lownds' , 'tony at pagedna.com'), - ('Alex Martelli' , 'aleax at aleax.it'), - ('Andrew McClelland' , 'eternalsquire at comcast.net'), - ('Gordon McMillan' , 'gmcm at hypernet.com'), - ('Andrew McNamara' , 'andrewm at object-craft.com.au'), - ('Trent Mick' , 'trentm at activestate.com'), - ('Mike Meyer' , 'mwm at mired.org'), - ('Skip Montanaro' , 'skip at pobox.com'), - ('Paul Moore' , 'gustav at morpheus.demon.co.uk'), - ('Ben North' , 'ben at redfrontdoor.org'), - ('Neal Norwitz' , 'nnorwitz at gmail.com'), - ('Travis Oliphant' , 'oliphant at ee.byu.edu'), - ('Jason Orendorff' , 'jason.orendorff at gmail.com'), - ('Samuele Pedroni' , 'pedronis at python.org'), - ('Michel Pelletier' , 'michel at users.sourceforge.net'), - ('Tim Peters' , 'tim at zope.com'), - ('Jason Petrone' , 'jp at demonseed.net'), - ('Paul Prescod' , 'paul at prescod.net'), - ('Terry Reedy' , 'tjreedy at udel.edu'), - ('Sean Reifschneider' , 'jafo-pep at tummy.com'), - ('Christian R. Reis' , 'kiko at async.com.br'), - ('Jonathan Riehl' , 'jriehl at spaceship.com'), - ('Andr? Roberge' , 'andre.roberge at gmail.com'), - ('Guido van Rossum' , 'guido at python.org'), - ('Just van Rossum' , 'just at letterror.com'), - ('Vinay Sajip' , 'vinay_sajip at red-dove.com'), - ('Neil Schemenauer' , 'nas at arctrix.com'), - ('Peter Schneider-Kamp' , 'nowonder at nowonder.de'), - ('Jiwon Seo' , 'seojiwon at gmail.com'), - ('Kevin D. Smith' , 'Kevin.Smith at theMorgue.org'), - ('Greg Stein' , 'gstein at lyra.org'), - ('Daniel Stutzbach' , 'daniel.stutzbach at gmail.com'), - ('Roman Suzi' , 'rnd at onego.ru'), - ('Talin' , 'talin at acm.org'), - ('Steven Taschuk' , 'staschuk at telusplanet.net'), - ('Oren Tirosh' , 'oren at hishome.net'), - ('Mike Verdone' , 'mike.verdone at gmail.com'), - ('Gregory R. Warnes' , 'warnes at users.sourceforge.net'), - ('Barry Warsaw' , 'barry at python.org'), - ('Terence Way' , 'terry at wayforward.net'), - ('Cliff Wells' , 'LogiplexSoftware at earthlink.net'), - ('Greg Wilson' , 'gvwilson at ddj.com'), - ('Collin Winter' , 'collinw at gmail.com'), - ('Thomas Wouters' , 'thomas at python.org'), - ('Ka-Ping Yee' , 'ping at zesty.ca'), - ('Moshe Zadka' , 'moshez at zadka.site.co.il'), - ('Huaiyu Zhu' , 'hzhu at users.sourceforge.net'), -) Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Wed Jun 20 18:55:09 2007 @@ -1,8 +1,8 @@ """Code to handle the output of PEP 0.""" from . import constants -from .pep import PEP, last_name +from .pep import PEP -from operator import itemgetter +from operator import attrgetter from sys import stdout @@ -31,13 +31,13 @@ for pep in peps: # Order of 'if' statement important. Key Status values take precedence # over Type value, and vice-versa. - if pep.status == 'Draft': + if pep.type_ == 'Process': + meta.append(pep) + elif pep.status == 'Draft': open_.append(pep) elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', 'Incomplete', 'Replaced'): dead.append(pep) - elif pep.type_ == 'Process': - meta.append(pep) elif pep.type_ == 'Informational': info.append(pep) elif pep.status in ('Accepted', 'Active'): @@ -50,6 +50,48 @@ return meta, info, accepted, open_, finished, dead +def verify_email_addresses(peps): + authors_dict = {} + for pep in peps: + for author in pep.authors: + # If this is the first time we have come across an author, add him. + if author not in authors_dict: + authors_dict[author] = [author.email] + else: + found_emails = authors_dict[author] + # If no email exists for the author, use the new value. + if not found_emails[0]: + authors_dict[author] = [author.email] + # If the new email is an empty string, move on. + elif not author.email: + continue + # If the email has not been seen, add it to the list. + elif author.email not in found_emails: + authors_dict[author].append(author.email) + + valid_authors_dict = {} + too_many_emails = [] + for author, emails in authors_dict.items(): + if len(emails) > 1: + too_many_emails.append((author.full_name, emails)) + else: + valid_authors_dict[author] = emails[0] + if too_many_emails: + err_output = [] + for author, emails in too_many_emails: + err_output.append(" %s: %r" % (author, emails)) + raise ValueError("some authors have more than one email address " + "listed:\n" + '\n'.join(err_output)) + + return valid_authors_dict + + +def sort_authors(authors_dict): + authors_list = authors_dict.keys() + authors_list.sort(key=attrgetter('sort_by')) + return authors_list + + def write_pep0(peps, output=stdout): print>>output, constants.header print>>output @@ -115,27 +157,21 @@ print>>output print>>output, "Owners" print>>output - max_name_len = len(max(constants.email_addresses, key=itemgetter(0))) - for name, nick in constants.nicknames.items(): - name_nick_len = len(name) + len(nick) + 3 # Cover space and parens. - if name_nick_len > max_name_len: - max_name_len = name_nick_len - else: - max_name_len += 2 # Cover comma and space between last and first name. + authors_dict = verify_email_addresses(peps) + max_name = max(authors_dict.keys(), + key=lambda x: len(x.first + x.last)) + # Don't forget to cover the comma and space separating first and last. + max_name_len = len(max_name.last) + len(max_name.first) + 2 print>>output, " %s %s" % ('name'.ljust(max_name_len), 'email address') print>>output, " %s %s" % ((len('name')*'-').ljust(max_name_len), len('email address')*'-') - for author, email in constants.email_addresses: - last_name_index = author.index(last_name(author)) - first = author[:last_name_index].strip() - last = author[last_name_index:].strip() - if not first: - last_first = last + sorted_authors = sort_authors(authors_dict) + for author in sorted_authors: + if not author.first: + last_first = author.last else: - last_first = ', '.join([last, first]) - if author in constants.nicknames: - last_first += " (%s)" % constants.nicknames[author] - print>>output, " %s %s" % (last_first.ljust(max_name_len), email) + last_first = ', '.join([author.last, author.first]) + print>>output, " %s %s" % (last_first.ljust(max_name_len), author.email) print>>output print>>output print>>output, "References" Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Wed Jun 20 18:55:09 2007 @@ -5,6 +5,84 @@ import textwrap +class Author(object): + + """Represent PEP authors. + + Attributes: + + + full_name : str + The author's full name. + + + full_last_first : str XXX + Output the author's name in Last, First, Suffix order. + + + first : str + The author's first name. A middle initial may be included. + + + last : str + The author's last name. + + + suffix : str XXX + A person's suffix (can be the empty string). + + + sort_by : str + Modification of the author's last name that should be used for + sorting. + + + email : str + The author's email address. + """ + + def __init__(self, author_and_email_tuple): + """Parse the name and email address of an author.""" + name, email = author_and_email_tuple + self.full_name = name + self.email = email.lower() + last_name_fragment = self._last_name(name) + name_sep = name.index(last_name_fragment) + self.last = name[name_sep:] + self.first = name[:name_sep] + + + def __hash__(self): + return hash(self.full_name) + + + def __eq__(self, other): + return self.full_name == other.full_name + + + @property + def sort_by(self): + if self.last.startswith('von ') or self.last.startswith('van '): + return self.last.split(' ', 1)[1] + return self.last + + + def _last_name(self, full_name): + """Find the last name (or nickname) of a full name. + + If no last name (e.g, 'Aahz') then return the full name. If there is a + leading, lowercase portion to the last name (e.g., 'van' or 'von') then + include it. If there is a suffix (e.g., 'Jr.') that is appended through a + comma, then drop the suffix. + + """ + no_suffix = full_name.partition(',')[0] + name_parts = no_suffix.split() + part_count = len(name_parts) + if part_count == 1 or part_count == 2: + return name_parts[-1] + else: + assert part_count > 2 + if name_parts[-2].islower(): + return ' '.join(name_parts[-2:]) + else: + return name_parts[-1] + + + class PEP(object): """Representation of PEPs. @@ -24,8 +102,8 @@ + status : str The PEP's status. Value must be found in PEP.status_values. - + authors : Sequence(str) - A list of the authors' full names. + + authors : Sequence(Author) + A list of the authors. """ # The various RFC 822 headers that are supported. @@ -45,13 +123,11 @@ status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", "Active", "Draft", "Replaced") - # XXX Uncomment to valid author names (along with code in __init__). - #valid_authors = set(x[0] for x in constants.email_addresses) - - def __init__(self, pep_file): """Init object from an open PEP file object.""" # Parse the headers. + # XXX Use email.parser.HeaderParser().parse() + # XXX Use email.message.keys() to validate header order. metadata = {} header_name = None header_field_iter = iter(self.headers) @@ -120,37 +196,37 @@ "Active status (PEP %s)" % self.number) self.status = status # 'Author'. - authors = self._parse_author(metadata['Author']) - # XXX Uncomment (plus valid_authors) to validate author names. - #for author in authors: - # if author not in self.valid_authors: - # raise ValueError("%s is not a valid author name" % author) - if len(authors) < 1: + authors_and_emails = self._parse_author(metadata['Author']) + if len(authors_and_emails) < 1: raise ValueError("no authors found (PEP %s)" % self.number) - self.authors = authors + self.authors = [Author(x) for x in authors_and_emails] def _parse_author(self, data): - """Return a list of author names.""" + """Return a list of author names and emails.""" # XXX Consider using email.utils.parseaddr (doesn't work with names # lacking an email address. - angled = r'(?P.+?) <.+?>' - paren = r'.+? \((?P.+?)\)' + angled = r'(?P.+?) <(?P.+?)>' + paren = r'(?P.+?) \((?P.+?)\)' simple = r'(?P[^,]+)' author_list = [] for regex in (angled, paren, simple): # Watch out for commas separating multiple names. regex += '(,\s*)?' for match in re.finditer(regex, data): - author = match.group('author') # Watch out for suffixes like 'Jr.' when they are comma-separated # from the name and thus cause issues when *all* names are only # separated by commas. - author = match.group('author') + match_dict = match.groupdict() + author = match_dict['author'] if not author.partition(' ')[1] and author.endswith('.'): prev_author = author_list.pop() author = ', '.join([prev_author, author]) - author_list.append(author) + if 'email' not in match_dict: + email = '' + else: + email = match_dict['email'] + author_list.append((author, email)) else: # If authors were found then stop searching as only expect one # style of author citation. @@ -176,8 +252,7 @@ @property def author_abbr(self): """Return the author list as a comma-separated with only last names.""" - return ', '.join(last_name(author, constants.nicknames) - for author in self.authors) + return ', '.join(x.last for x in self.authors) @property def title_abbr(self): @@ -194,28 +269,3 @@ 'title': self.title_abbr, 'status': self.status_abbr, 'authors': self.author_abbr} return constants.column_format % pep_info - - -def last_name(full_name, nicknames={}): - """Find the last name (or nickname) of a full name. - - If no last name (e.g, 'Aahz') then return the full name. If there is a - leading, lowercase portion to the last name (e.g., 'van' or 'von') then - include it. If there is a suffix (e.g., 'Jr.') that is appended through a - comma, then drop the suffix. - - """ - nickname = nicknames.get(full_name) - if nickname: - return nickname - no_suffix = full_name.partition(',')[0] - name_parts = no_suffix.split() - part_count = len(name_parts) - if part_count == 1 or part_count == 2: - return name_parts[-1] - else: - assert part_count > 2 - if name_parts[-2].islower(): - return ' '.join(name_parts[-2:]) - else: - return name_parts[-1] From python-checkins at python.org Wed Jun 20 18:56:41 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 18:56:41 +0200 (CEST) Subject: [Python-checkins] r56052 - sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070620165641.848431E4009@bag.python.org> Author: brett.cannon Date: Wed Jun 20 18:56:39 2007 New Revision: 56052 Modified: sandbox/trunk/pep0/pep0/pep.py Log: Add a note that quick hack for sorting with 'van' or 'von' is weak and should go back to the original algorithm of dumping the first word in a last name if it starts with a lowercase letter. Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Wed Jun 20 18:56:39 2007 @@ -55,6 +55,7 @@ @property def sort_by(self): + # XXX Change back to splitting off front word if lowercase. if self.last.startswith('von ') or self.last.startswith('van '): return self.last.split(' ', 1)[1] return self.last From python-checkins at python.org Wed Jun 20 21:14:06 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 21:14:06 +0200 (CEST) Subject: [Python-checkins] r56053 - peps/trunk/pep-0000.txt peps/trunk/pep-0246.txt peps/trunk/pep-0312.txt peps/trunk/pep-0323.txt Message-ID: <20070620191406.853CD1E4005@bag.python.org> Author: brett.cannon Date: Wed Jun 20 21:14:01 2007 New Revision: 56053 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0246.txt peps/trunk/pep-0312.txt peps/trunk/pep-0323.txt Log: Change Alex Martelli's email address. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Wed Jun 20 21:14:01 2007 @@ -580,7 +580,7 @@ Lindqvist, Bj?rn bjourne at gmail.com von Loewis, Martin loewis at informatik.hu-berlin.de Lownds, Tony tony at pagedna.com - Martelli, Alex aleax at aleax.it + Martelli, Alex aleaxit at gmail.com Maupin, Patrick pmaupin at gmail.com McClelland, Andrew eternalsquire at comcast.net McMillan, Gordon gmcm at hypernet.com Modified: peps/trunk/pep-0246.txt ============================================================================== --- peps/trunk/pep-0246.txt (original) +++ peps/trunk/pep-0246.txt Wed Jun 20 21:14:01 2007 @@ -2,7 +2,7 @@ Title: Object Adaptation Version: $Revision$ Last-Modified: $Date$ -Author: aleax at aleax.it (Alex Martelli), +Author: aleaxit at gmail.com (Alex Martelli), cce at clarkevans.com (Clark C. Evans) Status: Rejected Type: Standards Track Modified: peps/trunk/pep-0312.txt ============================================================================== --- peps/trunk/pep-0312.txt (original) +++ peps/trunk/pep-0312.txt Wed Jun 20 21:14:01 2007 @@ -2,7 +2,7 @@ Title: Simple Implicit Lambda Version: $Revision$ Last-Modified: $Date$ -Author: Roman Suzi , Alex Martelli +Author: Roman Suzi , Alex Martelli Status: Deferred Type: Standards Track Content-Type: text/plain Modified: peps/trunk/pep-0323.txt ============================================================================== --- peps/trunk/pep-0323.txt (original) +++ peps/trunk/pep-0323.txt Wed Jun 20 21:14:01 2007 @@ -2,7 +2,7 @@ Title: Copyable Iterators Version: $Revision$ Last-Modified: $Date$ -Author: Alex Martelli +Author: Alex Martelli Status: Deferred Type: Standards Track Content-Type: text/plain From python-checkins at python.org Wed Jun 20 21:19:32 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 21:19:32 +0200 (CEST) Subject: [Python-checkins] r56054 - peps/trunk/pep-0218.txt peps/trunk/pep-0289.txt peps/trunk/pep-0315.txt peps/trunk/pep-0329.txt peps/trunk/pep-3101.txt peps/trunk/pep-3102.txt peps/trunk/pep-3115.txt peps/trunk/pep-3126.txt peps/trunk/pep-3129.txt Message-ID: <20070620191932.EC6371E4005@bag.python.org> Author: brett.cannon Date: Wed Jun 20 21:19:26 2007 New Revision: 56054 Modified: peps/trunk/pep-0218.txt peps/trunk/pep-0289.txt peps/trunk/pep-0315.txt peps/trunk/pep-0329.txt peps/trunk/pep-3101.txt peps/trunk/pep-3102.txt peps/trunk/pep-3115.txt peps/trunk/pep-3126.txt peps/trunk/pep-3129.txt Log: De-obfuscate emails where the author had their address already listed without obfuscation. Also, the HTML output of PEPs already obfuscates the address and thus it is not needed in the text version. Modified: peps/trunk/pep-0218.txt ============================================================================== --- peps/trunk/pep-0218.txt (original) +++ peps/trunk/pep-0218.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Adding a Built-In Set Object Type Version: $Revision$ Last-Modified: $Date$ -Author: gvwilson at ddj.com (Greg Wilson), python at rcn.com (Raymond Hettinger) +Author: gvwilson at ddj.com (Greg Wilson), python at rcn.com (Raymond Hettinger) Status: Final Type: Standards Track Created: 31-Jul-2000 Modified: peps/trunk/pep-0289.txt ============================================================================== --- peps/trunk/pep-0289.txt (original) +++ peps/trunk/pep-0289.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Generator Expressions Version: $Revision$ Last-Modified: $Date$ -Author: python at rcn.com (Raymond D. Hettinger) +Author: python at rcn.com (Raymond D. Hettinger) Status: Final Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-0315.txt ============================================================================== --- peps/trunk/pep-0315.txt (original) +++ peps/trunk/pep-0315.txt Wed Jun 20 21:19:26 2007 @@ -2,8 +2,8 @@ Title: Enhanced While Loop Version: $Revision$ Last-Modified: $Date$ -Author: W Isaac Carroll - Raymond Hettinger +Author: W Isaac Carroll + Raymond Hettinger Status: Deferred Type: Standards Track Content-Type: text/plain Modified: peps/trunk/pep-0329.txt ============================================================================== --- peps/trunk/pep-0329.txt (original) +++ peps/trunk/pep-0329.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Treating Builtins as Constants in the Standard Library Version: $Revision$ Last-Modified: $Date$ -Author: Raymond Hettinger +Author: Raymond Hettinger Status: Rejected Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-3101.txt ============================================================================== --- peps/trunk/pep-3101.txt (original) +++ peps/trunk/pep-3101.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Advanced String Formatting Version: $Revision$ Last-Modified: $Date$ -Author: Talin +Author: Talin Status: Draft Type: Standards Track Content-Type: text/plain Modified: peps/trunk/pep-3102.txt ============================================================================== --- peps/trunk/pep-3102.txt (original) +++ peps/trunk/pep-3102.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Keyword-Only Arguments Version: $Revision$ Last-Modified: $Date$ -Author: Talin +Author: Talin Status: Accepted Type: Standards Track Content-Type: text/plain Modified: peps/trunk/pep-3115.txt ============================================================================== --- peps/trunk/pep-3115.txt (original) +++ peps/trunk/pep-3115.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Metaclasses in Python 3000 Version: $Revision$ Last-Modified: $Date$ -Author: Talin +Author: Talin Status: Accepted Type: Standards Track Content-Type: text/plain Modified: peps/trunk/pep-3126.txt ============================================================================== --- peps/trunk/pep-3126.txt (original) +++ peps/trunk/pep-3126.txt Wed Jun 20 21:19:26 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: Jim J. Jewett , - Raymond D. Hettinger + Raymond D. Hettinger Status: Rejected Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-3129.txt ============================================================================== --- peps/trunk/pep-3129.txt (original) +++ peps/trunk/pep-3129.txt Wed Jun 20 21:19:26 2007 @@ -2,7 +2,7 @@ Title: Class Decorators Version: $Revision$ Last-Modified: $Date$ -Author: Collin Winter +Author: Collin Winter Status: Final Type: Standards Track Content-Type: text/x-rst From python-checkins at python.org Wed Jun 20 21:36:01 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 21:36:01 +0200 (CEST) Subject: [Python-checkins] r56055 - sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070620193601.E74AA1E400C@bag.python.org> Author: brett.cannon Date: Wed Jun 20 21:35:58 2007 New Revision: 56055 Modified: sandbox/trunk/pep0/pep0/pep.py Log: Switch to using map so that the code is even simpler. Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Wed Jun 20 21:35:58 2007 @@ -200,7 +200,7 @@ authors_and_emails = self._parse_author(metadata['Author']) if len(authors_and_emails) < 1: raise ValueError("no authors found (PEP %s)" % self.number) - self.authors = [Author(x) for x in authors_and_emails] + self.authors = map(Author, authors_and_emails) def _parse_author(self, data): From python-checkins at python.org Wed Jun 20 23:25:35 2007 From: python-checkins at python.org (brett.cannon) Date: Wed, 20 Jun 2007 23:25:35 +0200 (CEST) Subject: [Python-checkins] r56056 - peps/trunk/pep-0000.txt peps/trunk/pep-0006.txt Message-ID: <20070620212535.8E64D1E400A@bag.python.org> Author: brett.cannon Date: Wed Jun 20 23:25:29 2007 New Revision: 56056 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0006.txt Log: Update Aahz's email address. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Wed Jun 20 23:25:29 2007 @@ -525,7 +525,7 @@ name email address ---------------- ------------- - Aahz aahz at pobox.com + Aahz aahz at pythoncraft.com Ahlstrom, James C. jim at interet.com Althoff, Jim james_althoff at i2.com Altis, Kevin altis at semi-retired.com Modified: peps/trunk/pep-0006.txt ============================================================================== --- peps/trunk/pep-0006.txt (original) +++ peps/trunk/pep-0006.txt Wed Jun 20 23:25:29 2007 @@ -2,7 +2,7 @@ Title: Bug Fix Releases Version: $Revision$ Last-Modified: $Date$ -Author: aahz at pobox.com (Aahz), anthony at interlink.com.au (Anthony Baxter) +Author: aahz at pythoncraft.com (Aahz), anthony at interlink.com.au (Anthony Baxter) Status: Active Type: Process Created: 15-Mar-2001 From python-checkins at python.org Thu Jun 21 02:48:34 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 21 Jun 2007 02:48:34 +0200 (CEST) Subject: [Python-checkins] r56057 - peps/trunk/pep-0000.txt peps/trunk/pep-0301.txt peps/trunk/pep-0345.txt Message-ID: <20070621004834.3711A1E4007@bag.python.org> Author: brett.cannon Date: Thu Jun 21 02:48:29 2007 New Revision: 56057 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0301.txt peps/trunk/pep-0345.txt Log: Update Richard Jones' email address. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 21 02:48:29 2007 @@ -572,7 +572,7 @@ Hylton, Jeremy jeremy at zope.com Jansen, Jack jack at cwi.nl Jewett, Jim jimjjewett at users.sourceforge.net - Jones, Richard richard at mechanicalcat.net + Jones, Richard richard at python.org Koltsov, Stepan yozh at mx1.ru Kuchling, A.M. amk at amk.ca Lemburg, Marc-Andre mal at lemburg.com Modified: peps/trunk/pep-0301.txt ============================================================================== --- peps/trunk/pep-0301.txt (original) +++ peps/trunk/pep-0301.txt Thu Jun 21 02:48:29 2007 @@ -2,7 +2,7 @@ Title: Package Index and Metadata for Distutils Version: $Revision$ Last-Modified: $Date$ -Author: Richard Jones +Author: Richard Jones Status: Final Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-0345.txt ============================================================================== --- peps/trunk/pep-0345.txt (original) +++ peps/trunk/pep-0345.txt Thu Jun 21 02:48:29 2007 @@ -2,7 +2,7 @@ Title: Metadata for Python Software Packages 1.2 Version: $Revision$ Last-Modified: $Date$ -Author: Richard Jones +Author: Richard Jones Discussions-To: Distutils SIG Status: Draft Type: Standards Track From nnorwitz at gmail.com Tue Jun 26 11:44:10 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Tue, 26 Jun 2007 05:44:10 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070626094410.GA25503@python.psfb.org> test_popen2 leaked [-26, 26, -26] references, sum=-26 test_sys leaked [-132, 0, 0] references, sum=-132 test_urllib2_localnet leaked [3, 1, 5] references, sum=9 From nnorwitz at gmail.com Thu Jun 28 00:14:21 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Wed, 27 Jun 2007 18:14:21 -0400 Subject: [Python-checkins] Python Regression Test Failures all (1) Message-ID: <20070627221421.GA11181@python.psfb.org> test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_unittest test_doctest test_doctest2 test_MimeWriter test_StringIO test___all__ test___future__ test__locale test_aepack test_aepack skipped -- No module named aepack test_al test_al skipped -- No module named al test_anydbm test_applesingle test_applesingle skipped -- No module named macostools test_array test_ast test_asynchat test_atexit test_audioop test_augassign test_base64 test_bastion test_bigaddrspace test_bigmem test_binascii test_binhex test_binop test_bisect test_bool test_bsddb test_bsddb185 test_bsddb185 skipped -- No module named bsddb185 test_bsddb3 Exception in thread reader 2: Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.6/threading.py", line 465, in __bootstrap self.run() File "/tmp/python-test/local/lib/python2.6/threading.py", line 445, in run self.__target(*self.__args, **self.__kwargs) File "/tmp/python-test/local/lib/python2.6/bsddb/test/test_thread.py", line 281, in readerThread rec = dbutils.DeadlockWrap(c.next, max_retries=10) File "/tmp/python-test/local/lib/python2.6/bsddb/dbutils.py", line 62, in DeadlockWrap return function(*_args, **_kwargs) DBLockDeadlockError: (-30996, 'DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock') test_bufio test_bz2 test_cProfile test_calendar test_call test_capi test_cd test_cd skipped -- No module named cd test_cfgparser test_cgi test_charmapcodec test_cl test_cl skipped -- No module named cl test_class test_cmath test_cmd_line test_code test_codeccallbacks test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_codecs test_codeop test_coding test_coercion test_collections test_colorsys test_commands test_compare test_compile test_compiler testCompileLibrary still working, be patient... test_complex test_complex_args test_contains test_contextlib test_cookie test_cookielib test_copy test_copy_reg test_cpickle test_crypt test_csv test_ctypes test_datetime test_dbm test_decimal test_decorators test_defaultdict test_deque test_descr test_descrtut test_difflib test_dircache test_dis test_distutils test_dl test_dumbdbm test_dummy_thread test_dummy_threading test_email test_email_codecs test_email_renamed test_enumerate test_eof test_errno test_exception_variations test_extcall test_fcntl test_file test_filecmp test_fileinput test_float test_fnmatch test_fork1 test_format test_fpformat test_frozen test_ftplib test_funcattrs test_functools test_future test_gc test_gdbm test_generators test_genericpath test_genexps test_getargs test_getargs2 test_getopt test_gettext test_gl test_gl skipped -- No module named gl test_glob test_global test_grp test_gzip test_hash test_hashlib test_heapq test_hexoct test_hmac test_hotshot test_htmllib test_htmlparser test_httplib test_imageop test_imageop skipped -- No module named imgfile test_imaplib test_imgfile test_imgfile skipped -- No module named imgfile test_imp test_import test_importhooks test_index test_inspect test_ioctl test_ioctl skipped -- Unable to open /dev/tty test_isinstance test_iter test_iterlen test_itertools test_largefile test_list test_locale test_logging test_long test_long_future test_longexp test_macostools test_macostools skipped -- No module named macostools test_macpath test_mailbox test_marshal test_math test_md5 test_mhlib test_mimetools test_mimetypes test_minidom test_mmap test_module test_modulefinder test_multibytecodec test_multibytecodec_support test_multifile test_mutants test_netrc test_new test_nis test_normalization test_ntpath test_old_mailbox test_openpty test_operator test_optparse test_os test_parser test_peepholer test_pep247 test_pep263 test_pep277 test_pep277 skipped -- test works only on NT+ test_pep292 test_pep352 test_pickle test_pickletools test_pkg test_pkgimport test_platform test_plistlib test_plistlib skipped -- No module named plistlib test_poll test_popen [7328 refs] [7328 refs] [7328 refs] test_popen2 test_poplib test_posix test_posixpath test_pow test_pprint test_profile test_profilehooks test_pty test_pwd test_pyclbr test_pyexpat test_queue test_quopri [7703 refs] [7703 refs] test_random test_re test_repr test_resource test_rfc822 test_richcmp test_robotparser test_runpy test_sax test_scope test_scriptpackages test_scriptpackages skipped -- No module named aetools test_select test_set test_sets test_sgmllib test_sha test_shelve test_shlex test_shutil test_signal test_site test_slice test_smtplib test_socket test_socket_ssl test_socketserver test_softspace test_sort test_sqlite test_startfile test_startfile skipped -- cannot import name startfile test_str test_strftime test_string test_stringprep test_strop test_strptime test_struct test_structmembers test_structseq test_subprocess [7323 refs] [7321 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7321 refs] [8869 refs] [7539 refs] [7324 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] [7323 refs] . [7323 refs] [7323 refs] this bit of output is from a test of stdout in a different process ... [7323 refs] [7323 refs] [7539 refs] test_sunaudiodev test_sunaudiodev skipped -- No module named sunaudiodev test_sundry test_symtable test_syntax test_sys [7323 refs] [7323 refs] test_tarfile test_tcl test_tcl skipped -- No module named _tkinter test_telnetlib test_tempfile [7327 refs] test_textwrap test_thread test_threaded_import test_threadedtempfile test_threading test_threading_local test_threadsignals test_time test_timeout test_tokenize test_trace test_traceback test_transformer test_tuple test_ucn test_unary test_unicode test_unicode_file test_unicode_file skipped -- No Unicode filesystem semantics on this platform. test_unicodedata test_univnewlines test_unpack test_urllib test_urllib2 test_urllib2_localnet test_urllib2net test test_urllib2net failed -- Traceback (most recent call last): File "/tmp/python-test/local/lib/python2.6/test/test_urllib2net.py", line 24, in testURLread f = urllib2.urlopen("http://www.python.org/") File "/tmp/python-test/local/lib/python2.6/urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "/tmp/python-test/local/lib/python2.6/urllib2.py", line 376, in open response = self._open(req, data) File "/tmp/python-test/local/lib/python2.6/urllib2.py", line 394, in _open '_open', req) File "/tmp/python-test/local/lib/python2.6/urllib2.py", line 354, in _call_chain result = func(*args) File "/tmp/python-test/local/lib/python2.6/urllib2.py", line 1104, in http_open return self.do_open(httplib.HTTPConnection, req) File "/tmp/python-test/local/lib/python2.6/urllib2.py", line 1079, in do_open raise URLError(err) URLError: test_urllibnet test_urlparse test_userdict test_userlist test_userstring test_uu test_uuid WARNING: uuid.getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._ifconfig_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. WARNING: uuid._unixdll_getnode is unreliable on many platforms. It is disabled until the code and/or test can be fixed properly. test_wait3 test_wait4 test_warnings test_wave test_weakref test_whichdb test_winreg test_winreg skipped -- No module named _winreg test_winsound test_winsound skipped -- No module named winsound test_with test_wsgiref test_xdrlib test_xml_etree test_xml_etree_c test_xmllib test_xmlrpc test_xpickle test_xrange test_zipfile test_zipfile64 test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run test_zipimport test_zlib 301 tests OK. 1 test failed: test_urllib2net 21 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl test_gl test_imageop test_imgfile test_ioctl test_macostools test_pep277 test_plistlib test_scriptpackages test_startfile test_sunaudiodev test_tcl test_unicode_file test_winreg test_winsound test_zipfile64 1 skip unexpected on linux2: test_ioctl [494489 refs] From python-checkins at python.org Thu Jun 28 06:58:14 2007 From: python-checkins at python.org (georg.brandl) Date: Thu, 28 Jun 2007 06:58:14 +0200 (CEST) Subject: [Python-checkins] r56091 - python/trunk/Doc/lib/libwinreg.tex Message-ID: <20070628045814.786A91E4004@bag.python.org> Author: georg.brandl Date: Wed Jun 27 16:09:56 2007 New Revision: 56091 Modified: python/trunk/Doc/lib/libwinreg.tex Log: Fix a variable name in winreg docs. Modified: python/trunk/Doc/lib/libwinreg.tex ============================================================================== --- python/trunk/Doc/lib/libwinreg.tex (original) +++ python/trunk/Doc/lib/libwinreg.tex Wed Jun 27 16:09:56 2007 @@ -321,7 +321,7 @@ \var{key} is an already open key, or one of the predefined \constant{HKEY_*} constants. - \var{sub_key} is a string that names the subkey with which the + \var{value_name} is a string that names the subkey with which the value is associated. \var{type} is an integer that specifies the type of the data. From python-checkins at python.org Thu Jun 28 19:03:43 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 19:03:43 +0200 (CEST) Subject: [Python-checkins] r56111 - python/branches/bcannon-objcap/secure_python.c Message-ID: <20070628170343.0AFE11E400C@bag.python.org> Author: brett.cannon Date: Thu Jun 28 19:03:42 2007 New Revision: 56111 Modified: python/branches/bcannon-objcap/secure_python.c Log: Explicitly set the program name. Modified: python/branches/bcannon-objcap/secure_python.c ============================================================================== --- python/branches/bcannon-objcap/secure_python.c (original) +++ python/branches/bcannon-objcap/secure_python.c Thu Jun 28 19:03:42 2007 @@ -50,6 +50,7 @@ PyObject *safe_extensions_seq; /* Initialize interpreter. */ + Py_SetProgramName("secure_python.exe"); Py_Initialize(); interp = PyThreadState_GET()->interp; From python-checkins at python.org Thu Jun 28 19:11:18 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 19:11:18 +0200 (CEST) Subject: [Python-checkins] r56112 - python/branches/bcannon-objcap/BRANCH_NOTES Message-ID: <20070628171118.9F2741E4008@bag.python.org> Author: brett.cannon Date: Thu Jun 28 19:11:18 2007 New Revision: 56112 Modified: python/branches/bcannon-objcap/BRANCH_NOTES Log: Note that one should not run ``make install`` as the symlinks used for importlib might not install files properly. Modified: python/branches/bcannon-objcap/BRANCH_NOTES ============================================================================== --- python/branches/bcannon-objcap/BRANCH_NOTES (original) +++ python/branches/bcannon-objcap/BRANCH_NOTES Thu Jun 28 19:11:18 2007 @@ -7,7 +7,9 @@ ================== Build instructions ================== -1. Build Python as normal. +1. Build Python as normal (``./configure``, ``make -s``; DO NOT run +``make install`` as I don't know if the symlinks for importlib will install the +files properly). 2. Run ``build_secure_py.sh`` to build ``secure_python.exe``. From python-checkins at python.org Thu Jun 28 21:44:21 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 21:44:21 +0200 (CEST) Subject: [Python-checkins] r56113 - peps/trunk/pep-0000.txt peps/trunk/pep-0279.txt peps/trunk/pep-0288.txt peps/trunk/pep-0289.txt peps/trunk/pep-0290.txt peps/trunk/pep-0308.txt peps/trunk/pep-3126.txt Message-ID: <20070628194421.6E7DD1E400B@bag.python.org> Author: brett.cannon Date: Thu Jun 28 21:44:20 2007 New Revision: 56113 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0279.txt peps/trunk/pep-0288.txt peps/trunk/pep-0289.txt peps/trunk/pep-0290.txt peps/trunk/pep-0308.txt peps/trunk/pep-3126.txt Log: Make Raymond Hettinger's name consistent. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 28 21:44:20 2007 @@ -566,7 +566,7 @@ Harris, Peter scav at blueyonder.co.uk Heller, Thomas theller at python.net Hetland, Magnus Lie magnus at hetland.org - Hettinger, Raymond D. python at rcn.com + Hettinger, Raymond python at rcn.com Hodgson, Neil neilh at scintilla.org Hudson, Michael mwh at python.net Hylton, Jeremy jeremy at alum.mit.edu Modified: peps/trunk/pep-0279.txt ============================================================================== --- peps/trunk/pep-0279.txt (original) +++ peps/trunk/pep-0279.txt Thu Jun 28 21:44:20 2007 @@ -2,7 +2,7 @@ Title: The enumerate() built-in function Version: $Revision$ Last-Modified: $Date$ -Author: python at rcn.com (Raymond D. Hettinger) +Author: python at rcn.com (Raymond Hettinger) Status: Final Type: Standards Track Created: 30-Jan-2002 Modified: peps/trunk/pep-0288.txt ============================================================================== --- peps/trunk/pep-0288.txt (original) +++ peps/trunk/pep-0288.txt Thu Jun 28 21:44:20 2007 @@ -2,7 +2,7 @@ Title: Generators Attributes and Exceptions Version: $Revision$ Last-Modified: $Date$ -Author: python at rcn.com (Raymond D. Hettinger) +Author: python at rcn.com (Raymond Hettinger) Status: Withdrawn Type: Standards Track Created: 21-Mar-2002 Modified: peps/trunk/pep-0289.txt ============================================================================== --- peps/trunk/pep-0289.txt (original) +++ peps/trunk/pep-0289.txt Thu Jun 28 21:44:20 2007 @@ -2,7 +2,7 @@ Title: Generator Expressions Version: $Revision$ Last-Modified: $Date$ -Author: python at rcn.com (Raymond D. Hettinger) +Author: python at rcn.com (Raymond Hettinger) Status: Final Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-0290.txt ============================================================================== --- peps/trunk/pep-0290.txt (original) +++ peps/trunk/pep-0290.txt Thu Jun 28 21:44:20 2007 @@ -2,7 +2,7 @@ Title: Code Migration and Modernization Version: $Revision$ Last-Modified: $Date$ -Author: Raymond D. Hettinger +Author: Raymond Hettinger Status: Active Type: Informational Content-Type: text/x-rst Modified: peps/trunk/pep-0308.txt ============================================================================== --- peps/trunk/pep-0308.txt (original) +++ peps/trunk/pep-0308.txt Thu Jun 28 21:44:20 2007 @@ -2,7 +2,7 @@ Title: Conditional Expressions Version: $Revision$ Last-Modified: $Date$ -Author: Guido van Rossum, Raymond D. Hettinger +Author: Guido van Rossum, Raymond Hettinger Status: Final Type: Standards Track Content-Type: text/plain Modified: peps/trunk/pep-3126.txt ============================================================================== --- peps/trunk/pep-3126.txt (original) +++ peps/trunk/pep-3126.txt Thu Jun 28 21:44:20 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: Jim J. Jewett , - Raymond D. Hettinger + Raymond Hettinger Status: Rejected Type: Standards Track Content-Type: text/x-rst From python-checkins at python.org Thu Jun 28 21:46:23 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 21:46:23 +0200 (CEST) Subject: [Python-checkins] r56114 - peps/trunk/pep-0000.txt peps/trunk/pep-0284.txt Message-ID: <20070628194623.332651E400A@bag.python.org> Author: brett.cannon Date: Thu Jun 28 21:46:22 2007 New Revision: 56114 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0284.txt Log: Standardize Gregory Ewing's name. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 28 21:46:22 2007 @@ -555,7 +555,7 @@ Epler, Jeff jepler at unpythonic.net Eppstein, David eppstein at ics.uci.edu Evans, Clark C. cce at clarkevans.com - Ewing, Greg greg at cosc.canterbury.ac.nz + Ewing, Gregory greg at cosc.canterbury.ac.nz Faassen, Martijn faassen at infrae.com Finney, Ben ben+python at benfinney.id.au Giacometti, Fr?d?ric B. fred at arakne.com Modified: peps/trunk/pep-0284.txt ============================================================================== --- peps/trunk/pep-0284.txt (original) +++ peps/trunk/pep-0284.txt Thu Jun 28 21:46:22 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: eppstein at ics.uci.edu (David Eppstein), - greg at cosc.canterbury.ac.nz (Greg Ewing) + greg at cosc.canterbury.ac.nz (Gregory Ewing) Status: Rejected Type: Standards Track Created: 1-Mar-2002 From python-checkins at python.org Thu Jun 28 21:49:58 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 21:49:58 +0200 (CEST) Subject: [Python-checkins] r56115 - peps/trunk/pep-0000.txt peps/trunk/pep-0318.txt Message-ID: <20070628194958.6F9021E4009@bag.python.org> Author: brett.cannon Date: Thu Jun 28 21:49:58 2007 New Revision: 56115 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0318.txt Log: Make Jim J. Jewett's name consistent. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 28 21:49:58 2007 @@ -571,7 +571,7 @@ Hudson, Michael mwh at python.net Hylton, Jeremy jeremy at alum.mit.edu Jansen, Jack jack at cwi.nl - Jewett, Jim jimjjewett at users.sourceforge.net + Jewett, Jim J. jimjjewett at users.sourceforge.net Jones, Richard richard at python.org Koltsov, Stepan yozh at mx1.ru Kuchling, A.M. amk at amk.ca Modified: peps/trunk/pep-0318.txt ============================================================================== --- peps/trunk/pep-0318.txt (original) +++ peps/trunk/pep-0318.txt Thu Jun 28 21:49:58 2007 @@ -2,7 +2,7 @@ Title: Decorators for Functions and Methods Version: $Revision$ Last-Modified: $Date$ -Author: Kevin D. Smith, Jim Jewett, Skip Montanaro, Anthony Baxter +Author: Kevin D. Smith, Jim J. Jewett, Skip Montanaro, Anthony Baxter Status: Final Type: Standards Track Content-Type: text/x-rst From python-checkins at python.org Thu Jun 28 21:53:41 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 21:53:41 +0200 (CEST) Subject: [Python-checkins] r56116 - peps/trunk/pep-0000.txt peps/trunk/pep-0001.txt peps/trunk/pep-0009.txt peps/trunk/pep-0010.txt peps/trunk/pep-0012.txt peps/trunk/pep-0101.txt peps/trunk/pep-0102.txt peps/trunk/pep-0201.txt peps/trunk/pep-0214.txt peps/trunk/pep-0231.txt peps/trunk/pep-0232.txt peps/trunk/pep-0251.txt peps/trunk/pep-0274.txt peps/trunk/pep-0292.txt peps/trunk/pep-0351.txt peps/trunk/pep-0364.txt Message-ID: <20070628195341.CE4441E4009@bag.python.org> Author: brett.cannon Date: Thu Jun 28 21:53:41 2007 New Revision: 56116 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0001.txt peps/trunk/pep-0009.txt peps/trunk/pep-0010.txt peps/trunk/pep-0012.txt peps/trunk/pep-0101.txt peps/trunk/pep-0102.txt peps/trunk/pep-0201.txt peps/trunk/pep-0214.txt peps/trunk/pep-0231.txt peps/trunk/pep-0232.txt peps/trunk/pep-0251.txt peps/trunk/pep-0274.txt peps/trunk/pep-0292.txt peps/trunk/pep-0351.txt peps/trunk/pep-0364.txt Log: Make Barry Warsaw's name consistent. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 28 21:53:41 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: David Goodger , - Barry A. Warsaw + Barry Warsaw Status: Active Type: Process Created: 13-Jul-2000 Modified: peps/trunk/pep-0001.txt ============================================================================== --- peps/trunk/pep-0001.txt (original) +++ peps/trunk/pep-0001.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: PEP Purpose and Guidelines Version: $Revision$ Last-Modified: $Date$ -Author: Barry A. Warsaw, Jeremy Hylton, David Goodger +Author: Barry Warsaw, Jeremy Hylton, David Goodger Status: Active Type: Process Content-Type: text/x-rst Modified: peps/trunk/pep-0009.txt ============================================================================== --- peps/trunk/pep-0009.txt (original) +++ peps/trunk/pep-0009.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Sample Plaintext PEP Template Version: $Revision$ Last-Modified: $Date$ -Author: Barry A. Warsaw +Author: Barry Warsaw Status: Active Type: Process Content-Type: text/plain Modified: peps/trunk/pep-0010.txt ============================================================================== --- peps/trunk/pep-0010.txt (original) +++ peps/trunk/pep-0010.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Voting Guidelines Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Active Type: Process Created: 07-Mar-2002 Modified: peps/trunk/pep-0012.txt ============================================================================== --- peps/trunk/pep-0012.txt (original) +++ peps/trunk/pep-0012.txt Thu Jun 28 21:53:41 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: David Goodger , - Barry A. Warsaw + Barry Warsaw Status: Active Type: Process Content-Type: text/x-rst Modified: peps/trunk/pep-0101.txt ============================================================================== --- peps/trunk/pep-0101.txt (original) +++ peps/trunk/pep-0101.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Doing Python Releases 101 Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw), guido at python.org (Guido van Rossum) +Author: barry at python.org (Barry Warsaw), guido at python.org (Guido van Rossum) Status: Active Type: Informational Created: 22-Aug-2001 Modified: peps/trunk/pep-0102.txt ============================================================================== --- peps/trunk/pep-0102.txt (original) +++ peps/trunk/pep-0102.txt Thu Jun 28 21:53:41 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: anthony at interlink.com.au (Anthony Baxter), - barry at python.org (Barry A. Warsaw), + barry at python.org (Barry Warsaw), guido at python.org (Guido van Rossum) Status: Active Type: Informational Modified: peps/trunk/pep-0201.txt ============================================================================== --- peps/trunk/pep-0201.txt (original) +++ peps/trunk/pep-0201.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Lockstep Iteration Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Final Type: Standards Track Created: 13-Jul-2000 Modified: peps/trunk/pep-0214.txt ============================================================================== --- peps/trunk/pep-0214.txt (original) +++ peps/trunk/pep-0214.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Extended Print Statement Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Final Type: Standards Track Created: 24-Jul-2000 Modified: peps/trunk/pep-0231.txt ============================================================================== --- peps/trunk/pep-0231.txt (original) +++ peps/trunk/pep-0231.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: __findattr__() Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Rejected Type: Standards Track Created: 30-Nov-2000 Modified: peps/trunk/pep-0232.txt ============================================================================== --- peps/trunk/pep-0232.txt (original) +++ peps/trunk/pep-0232.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Function Attributes Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Final Type: Standards Track Created: 02-Dec-2000 Modified: peps/trunk/pep-0251.txt ============================================================================== --- peps/trunk/pep-0251.txt (original) +++ peps/trunk/pep-0251.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Python 2.2 Release Schedule Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw), guido at python.org (Guido van Rossum) +Author: barry at python.org (Barry Warsaw), guido at python.org (Guido van Rossum) Status: Final Type: Informational Created: 17-Apr-2001 Modified: peps/trunk/pep-0274.txt ============================================================================== --- peps/trunk/pep-0274.txt (original) +++ peps/trunk/pep-0274.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Dict Comprehensions Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Withdrawn Type: Standards Track Created: 25-Oct-2001 Modified: peps/trunk/pep-0292.txt ============================================================================== --- peps/trunk/pep-0292.txt (original) +++ peps/trunk/pep-0292.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Simpler String Substitutions Version: $Revision$ Last-Modified: $Date$ -Author: barry at python.org (Barry A. Warsaw) +Author: barry at python.org (Barry Warsaw) Status: Final Type: Standards Track Created: 18-Jun-2002 Modified: peps/trunk/pep-0351.txt ============================================================================== --- peps/trunk/pep-0351.txt (original) +++ peps/trunk/pep-0351.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: The freeze protocol Version: 2.5 Last-Modified: $Date$ -Author: Barry A. Warsaw +Author: Barry Warsaw Status: Rejected Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-0364.txt ============================================================================== --- peps/trunk/pep-0364.txt (original) +++ peps/trunk/pep-0364.txt Thu Jun 28 21:53:41 2007 @@ -2,7 +2,7 @@ Title: Transitioning to the Py3K Standard Library Version: $Revision$ Last-Modified: $Date$ -Author: Barry A. Warsaw +Author: Barry Warsaw Status: Draft Type: Standards Track Content-Type: text/x-rst From python-checkins at python.org Thu Jun 28 22:03:18 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 22:03:18 +0200 (CEST) Subject: [Python-checkins] r56117 - peps/trunk/pep-0000.txt peps/trunk/pep-0004.txt peps/trunk/pep-0011.txt peps/trunk/pep-0244.txt peps/trunk/pep-0263.txt peps/trunk/pep-0286.txt peps/trunk/pep-0347.txt peps/trunk/pep-0353.txt peps/trunk/pep-3120.txt peps/trunk/pep-3121.txt peps/trunk/pep-3123.txt peps/trunk/pep-3131.txt Message-ID: <20070628200318.D70B71E4009@bag.python.org> Author: brett.cannon Date: Thu Jun 28 22:03:18 2007 New Revision: 56117 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0004.txt peps/trunk/pep-0011.txt peps/trunk/pep-0244.txt peps/trunk/pep-0263.txt peps/trunk/pep-0286.txt peps/trunk/pep-0347.txt peps/trunk/pep-0353.txt peps/trunk/pep-3120.txt peps/trunk/pep-3121.txt peps/trunk/pep-3123.txt peps/trunk/pep-3131.txt Log: Standardize Marin von Loewis' name. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 28 22:03:18 2007 @@ -578,7 +578,7 @@ Lemburg, Marc-Andre mal at lemburg.com Lielens, Gregory gregory.lielens at fft.be Lindqvist, Bj?rn bjourne at gmail.com - von Loewis, Martin martin at v.loewis.de + von L?wis, Martin martin at v.loewis.de Lownds, Tony tony at pagedna.com Martelli, Alex aleaxit at gmail.com Maupin, Patrick pmaupin at gmail.com Modified: peps/trunk/pep-0004.txt ============================================================================== --- peps/trunk/pep-0004.txt (original) +++ peps/trunk/pep-0004.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Deprecation of Standard Modules Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. Loewis +Author: Martin von L?wis Status: Active Type: Process Created: 1-Oct-2000 Modified: peps/trunk/pep-0011.txt ============================================================================== --- peps/trunk/pep-0011.txt (original) +++ peps/trunk/pep-0011.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Removing support for little used platforms Version: $Revision$ Last-Modified: $Date$ -Author: martin at v.loewis.de (Martin v. L?wis) +Author: martin at v.loewis.de (Martin von L?wis) Status: Active Type: Process Created: 07-Jul-2002 Modified: peps/trunk/pep-0244.txt ============================================================================== --- peps/trunk/pep-0244.txt (original) +++ peps/trunk/pep-0244.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: The `directive' statement Version: $Revision$ Last-Modified: $Date$ -Author: martin at v.loewis.de (Martin von Loewis) +Author: martin at v.loewis.de (Martin von L?wis) Status: Rejected Type: Standards Track Created: 20-Mar-2001 Modified: peps/trunk/pep-0263.txt ============================================================================== --- peps/trunk/pep-0263.txt (original) +++ peps/trunk/pep-0263.txt Thu Jun 28 22:03:18 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: mal at lemburg.com (Marc-Andr? Lemburg), - martin at v.loewis.de (Martin v. L?wis) + martin at v.loewis.de (Martin von L?wis) Status: Final Type: Standards Track Created: 06-Jun-2001 Modified: peps/trunk/pep-0286.txt ============================================================================== --- peps/trunk/pep-0286.txt (original) +++ peps/trunk/pep-0286.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Enhanced Argument Tuples Version: $Revision$ Last-Modified: $Date$ -Author: martin at v.loewis.de (Martin von Loewis) +Author: martin at v.loewis.de (Martin von L?wis) Status: Draft Type: Standards Track Created: 3-Mar-2002 Modified: peps/trunk/pep-0347.txt ============================================================================== --- peps/trunk/pep-0347.txt (original) +++ peps/trunk/pep-0347.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Migrating the Python CVS to Subversion Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. L?wis +Author: Martin von L?wis Discussions-To: Status: Accepted Type: Process Modified: peps/trunk/pep-0353.txt ============================================================================== --- peps/trunk/pep-0353.txt (original) +++ peps/trunk/pep-0353.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Using ssize_t as the index type Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. L?wis +Author: Martin von L?wis Status: Final Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-3120.txt ============================================================================== --- peps/trunk/pep-3120.txt (original) +++ peps/trunk/pep-3120.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Using UTF-8 as the default source encoding Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. L?wis +Author: Martin von L?wis Status: Accepted Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-3121.txt ============================================================================== --- peps/trunk/pep-3121.txt (original) +++ peps/trunk/pep-3121.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Extension Module Initialization and Finalization Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. L?wis +Author: Martin von L?wis Status: Accepted Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-3123.txt ============================================================================== --- peps/trunk/pep-3123.txt (original) +++ peps/trunk/pep-3123.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Making PyObject_HEAD conform to standard C Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. L?wis +Author: Martin von L?wis Status: Accepted Type: Standards Track Content-Type: text/x-rst Modified: peps/trunk/pep-3131.txt ============================================================================== --- peps/trunk/pep-3131.txt (original) +++ peps/trunk/pep-3131.txt Thu Jun 28 22:03:18 2007 @@ -2,7 +2,7 @@ Title: Supporting Non-ASCII Identifiers Version: $Revision$ Last-Modified: $Date$ -Author: Martin v. L?wis +Author: Martin von L?wis Status: Accepted Type: Standards Track Content-Type: text/x-rst From python-checkins at python.org Thu Jun 28 22:07:12 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 22:07:12 +0200 (CEST) Subject: [Python-checkins] r56118 - peps/trunk/pep-0000.txt peps/trunk/pep-0100.txt peps/trunk/pep-0224.txt peps/trunk/pep-0248.txt peps/trunk/pep-0249.txt Message-ID: <20070628200712.D0A4E1E4011@bag.python.org> Author: brett.cannon Date: Thu Jun 28 22:07:12 2007 New Revision: 56118 Modified: peps/trunk/pep-0000.txt peps/trunk/pep-0100.txt peps/trunk/pep-0224.txt peps/trunk/pep-0248.txt peps/trunk/pep-0249.txt Log: Add missing accent marks on MAL's name. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Thu Jun 28 22:07:12 2007 @@ -575,7 +575,7 @@ Jones, Richard richard at python.org Koltsov, Stepan yozh at mx1.ru Kuchling, A.M. amk at amk.ca - Lemburg, Marc-Andre mal at lemburg.com + Lemburg, Marc-Andr? mal at lemburg.com Lielens, Gregory gregory.lielens at fft.be Lindqvist, Bj?rn bjourne at gmail.com von L?wis, Martin martin at v.loewis.de Modified: peps/trunk/pep-0100.txt ============================================================================== --- peps/trunk/pep-0100.txt (original) +++ peps/trunk/pep-0100.txt Thu Jun 28 22:07:12 2007 @@ -2,7 +2,7 @@ Title: Python Unicode Integration Version: $Revision$ Last-Modified: $Date$ -Author: mal at lemburg.com (Marc-Andre Lemburg) +Author: mal at lemburg.com (Marc-Andr? Lemburg) Status: Final Type: Standards Track Created: 10-Mar-2000 Modified: peps/trunk/pep-0224.txt ============================================================================== --- peps/trunk/pep-0224.txt (original) +++ peps/trunk/pep-0224.txt Thu Jun 28 22:07:12 2007 @@ -2,7 +2,7 @@ Title: Attribute Docstrings Version: $Revision$ Last-Modified: $Date$ -Author: mal at lemburg.com (Marc-Andre Lemburg) +Author: mal at lemburg.com (Marc-Andr? Lemburg) Status: Rejected Type: Standards Track Created: 23-Aug-2000 Modified: peps/trunk/pep-0248.txt ============================================================================== --- peps/trunk/pep-0248.txt (original) +++ peps/trunk/pep-0248.txt Thu Jun 28 22:07:12 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: db-sig at python.org (Python Database SIG), - mal at lemburg.com (Marc-Andre Lemburg) + mal at lemburg.com (Marc-Andr? Lemburg) Status: Final Type: Informational Created: Modified: peps/trunk/pep-0249.txt ============================================================================== --- peps/trunk/pep-0249.txt (original) +++ peps/trunk/pep-0249.txt Thu Jun 28 22:07:12 2007 @@ -3,7 +3,7 @@ Version: $Revision$ Last-Modified: $Date$ Author: db-sig at python.org (Python Database SIG), - mal at lemburg.com (Marc-Andre Lemburg) + mal at lemburg.com (Marc-Andr? Lemburg) Status: Final Type: Informational Created: From python-checkins at python.org Thu Jun 28 22:11:32 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 22:11:32 +0200 (CEST) Subject: [Python-checkins] r56119 - peps/trunk/pep-0248.txt peps/trunk/pep-0249.txt Message-ID: <20070628201132.946321E4013@bag.python.org> Author: brett.cannon Date: Thu Jun 28 22:11:32 2007 New Revision: 56119 Modified: peps/trunk/pep-0248.txt peps/trunk/pep-0249.txt Log: The DB SIG is not an author but where discussions should go. Modified: peps/trunk/pep-0248.txt ============================================================================== --- peps/trunk/pep-0248.txt (original) +++ peps/trunk/pep-0248.txt Thu Jun 28 22:11:32 2007 @@ -2,8 +2,8 @@ Title: Python Database API Specification v1.0 Version: $Revision$ Last-Modified: $Date$ -Author: db-sig at python.org (Python Database SIG), - mal at lemburg.com (Marc-Andr? Lemburg) +Author: mal at lemburg.com (Marc-Andr? Lemburg) +Discussions-To: db-sig at python.org Status: Final Type: Informational Created: Modified: peps/trunk/pep-0249.txt ============================================================================== --- peps/trunk/pep-0249.txt (original) +++ peps/trunk/pep-0249.txt Thu Jun 28 22:11:32 2007 @@ -2,8 +2,8 @@ Title: Python Database API Specification v2.0 Version: $Revision$ Last-Modified: $Date$ -Author: db-sig at python.org (Python Database SIG), - mal at lemburg.com (Marc-Andr? Lemburg) +Author: mal at lemburg.com (Marc-Andr? Lemburg) +Discussions-To: db-sig at python.org Status: Final Type: Informational Created: From buildbot at python.org Thu Jun 28 22:23:53 2007 From: buildbot at python.org (buildbot at python.org) Date: Thu, 28 Jun 2007 20:23:53 +0000 Subject: [Python-checkins] buildbot warnings in sparc Ubuntu dapper trunk Message-ID: <20070628202353.E671C1E4009@bag.python.org> The Buildbot has detected a new failure of sparc Ubuntu dapper trunk. Full details are available at: http://www.python.org/dev/buildbot/all/sparc%2520Ubuntu%2520dapper%2520trunk/builds/0 Buildbot URL: http://www.python.org/dev/buildbot/all/ Build Reason: The web-page 'force build' button was pressed by 'MatthiasKlose': test rebuild Build Source Stamp: [branch trunk] HEAD Blamelist: Build had warnings: warnings test failed slave lost Excerpt from the test logfile: sincerely, -The Buildbot From python-checkins at python.org Thu Jun 28 22:39:22 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 22:39:22 +0200 (CEST) Subject: [Python-checkins] r56120 - sandbox/trunk/pep0/pep0/pep.py Message-ID: <20070628203922.965891E4009@bag.python.org> Author: brett.cannon Date: Thu Jun 28 22:39:22 2007 New Revision: 56120 Modified: sandbox/trunk/pep0/pep0/pep.py Log: Strip whitespace as needed. Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Thu Jun 28 22:39:22 2007 @@ -38,11 +38,11 @@ def __init__(self, author_and_email_tuple): """Parse the name and email address of an author.""" name, email = author_and_email_tuple - self.first_last = name + self.first_last = name.strip() self.email = email.lower() last_name_fragment, suffix = self._last_name(name) name_sep = name.index(last_name_fragment) - self.first = name[:name_sep] + self.first = name[:name_sep].strip() self.last = last_name_fragment self.suffix = suffix if not self.first: From python-checkins at python.org Thu Jun 28 22:40:04 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 22:40:04 +0200 (CEST) Subject: [Python-checkins] r56121 - sandbox/trunk/pep0/pep0/output.py Message-ID: <20070628204004.950A41E4009@bag.python.org> Author: brett.cannon Date: Thu Jun 28 22:40:04 2007 New Revision: 56121 Modified: sandbox/trunk/pep0/pep0/output.py Log: Fix bug where an author's email address is not outputted if the author instance does not have an email address during the multiple email check. Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Thu Jun 28 22:40:04 2007 @@ -3,7 +3,8 @@ from .pep import PEP from operator import attrgetter -from sys import stdout, stderr +from sys import stdout +import warnings indent = ' ' @@ -33,8 +34,10 @@ # over Type value, and vice-versa. if pep.type_ == 'Process': if pep.status == 'Draft': - print>>stderr, ("index ambiguity: PEP %s is a Draft, Process " - "PEP" % pep.number) + warnings.warn("PEP %s is a Process PEP that is still is a " + "Draft; ambiguous listing in PEP 0" % + pep.number, + UserWarning) meta.append(pep) elif pep.status == 'Draft': open_.append(pep) @@ -76,7 +79,7 @@ too_many_emails = [] for author, emails in authors_dict.items(): if len(emails) > 1: - too_many_emails.append((author.full_name, emails)) + too_many_emails.append((author.first_last, emails)) else: valid_authors_dict[author] = emails[0] if too_many_emails: @@ -163,13 +166,16 @@ authors_dict = verify_email_addresses(peps) max_name = max(authors_dict.keys(), key=lambda x: len(x.last_first)) + max_name_len = len(max_name.last_first) print>>output, " %s %s" % ('name'.ljust(max_name_len), 'email address') print>>output, " %s %s" % ((len('name')*'-').ljust(max_name_len), len('email address')*'-') sorted_authors = sort_authors(authors_dict) for author in sorted_authors: + # Use the email from authors_dict instead of the one from 'author' as + # the author instance may have an empty email. print>>output, (" %s %s" % - (author.last_first.ljust(max_name_len), author.email)) + (author.last_first.ljust(max_name_len), authors_dict[author])) print>>output print>>output print>>output, "References" From python-checkins at python.org Thu Jun 28 22:40:29 2007 From: python-checkins at python.org (brett.cannon) Date: Thu, 28 Jun 2007 22:40:29 +0200 (CEST) Subject: [Python-checkins] r56122 - sandbox/trunk/pep0/NOTES Message-ID: <20070628204029.9C7C41E4009@bag.python.org> Author: brett.cannon Date: Thu Jun 28 22:40:29 2007 New Revision: 56122 Modified: sandbox/trunk/pep0/NOTES Log: List some todos. Modified: sandbox/trunk/pep0/NOTES ============================================================================== --- sandbox/trunk/pep0/NOTES (original) +++ sandbox/trunk/pep0/NOTES Thu Jun 28 22:40:29 2007 @@ -1,9 +1,12 @@ -Functionality to add --------------------- +TODO +----- * Read PEPs as UTF-8. * Author/email list. + + Decide on final format of email lists. + - Parse new format. + - Warn on PEPs using the old format. + Fix loss of a single space when name contains an accented character. * Verify PEP is well-formatted. From nnorwitz at gmail.com Thu Jun 28 23:44:00 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Thu, 28 Jun 2007 17:44:00 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070628214400.GA19635@python.psfb.org> test_popen2 leaked [-49, 49, -49] references, sum=-49 test_sys leaked [0, 0, 132] references, sum=132 test_urllib2_localnet leaked [5, 3, 3] references, sum=11 From python-checkins at python.org Fri Jun 29 00:39:45 2007 From: python-checkins at python.org (alexandre.vassalotti) Date: Fri, 29 Jun 2007 00:39:45 +0200 (CEST) Subject: [Python-checkins] r56123 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Message-ID: <20070628223945.91DB11E4009@bag.python.org> Author: alexandre.vassalotti Date: Fri Jun 29 00:39:45 2007 New Revision: 56123 Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c Log: Expose the internal buffer of StringIO and BytesIO objects. This makes subclassing these objects easier. Modified: python/branches/cpy_merge/Modules/_bytes_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_bytes_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_bytes_iomodule.c Fri Jun 29 00:39:45 2007 @@ -142,6 +142,36 @@ return PyString_FromStringAndSize(self->buf, self->string_size); } +/* Not exposed as a method of BytesIO. */ +static int +bytes_io_setvalue(BytesIOObject *self, PyObject *value) +{ + if (self->buf == NULL) { + err_closed(); + return -1; + } + + self->pos = 0; + self->string_size = 0; + + if (value == NULL) + return 0; + + if (!PyString_Check(value)) { + PyErr_SetString(PyExc_TypeError, "need a string"); + return -1; + } + if ((write_bytes(self, PyString_AsString(value), + PyString_Size(value))) < 0) { + return -1; /* out of memory */ + } + /* Reset the position back to beginning-of-file, since + write_bytes changed it. */ + self->pos = 0; + + return 0; +} + static PyObject * bytes_io_isatty(BytesIOObject *self) { @@ -524,6 +554,8 @@ static PyGetSetDef BytesIO_getsetlist[] = { {"closed", (getter) bytes_io_get_closed, NULL, "True if the file is closed."}, + {"_buffer", (getter) bytes_io_getvalue, (setter) bytes_io_setvalue, + NULL}, {0}, /* sentinel */ }; Modified: python/branches/cpy_merge/Modules/_string_iomodule.c ============================================================================== --- python/branches/cpy_merge/Modules/_string_iomodule.c (original) +++ python/branches/cpy_merge/Modules/_string_iomodule.c Fri Jun 29 00:39:45 2007 @@ -141,6 +141,36 @@ return PyUnicode_FromUnicode(self->buf, self->string_size); } +/* Not exposed as a method of StringIO. */ +static int +string_io_setvalue(StringIOObject *self, PyObject *value) +{ + if (self->buf == NULL) { + err_closed(); + return -1; + } + + self->pos = 0; + self->string_size = 0; + + if (value == NULL) + return 0; + + if (!PyUnicode_Check(value)) { + PyErr_SetString(PyExc_TypeError, "need a unicode object"); + return -1; + } + if ((write_str(self, PyUnicode_AsUnicode(value), + PyUnicode_GetSize(value))) < 0) { + return -1; /* out of memory */ + } + /* Reset the position back to beginning-of-file, since + write_str changed it. */ + self->pos = 0; + + return 0; +} + static PyObject * string_io_isatty(StringIOObject *self) { @@ -530,6 +560,8 @@ static PyGetSetDef StringIO_getsetlist[] = { {"closed", (getter) string_io_get_closed, NULL, "True if the file is closed"}, + {"_buffer", (getter) string_io_getvalue, (setter) string_io_setvalue, + NULL}, {0}, /* sentinel */ }; From gki at pldtdsl.net Thu Jun 28 21:45:04 2007 From: gki at pldtdsl.net (Global Knowledge PH) Date: Fri, 29 Jun 2007 03:45:04 +0800 Subject: [Python-checkins] Basic Instructor Training Course on July 5-6 & Organize Yourself for Success July 10, 2007 Message-ID: <6e75a01c7b9bc$d2ff37c0$2401a8c0@gk8240e6dd7d6e> Global Knowledge Associates invites you to attend.... Basic Instructor Training Course 2-Days | July 5-6, 2007 | 9am - 5pm | P 8,250 + VAT / pax Penthouse East Tower, PSE Bldg. Exchange Road, Ortigas Center The basic instructor training course has been carefully developed to teach those wishing to enter into an adult training environment, the basic teaching skills necessary to become an instructor/trainer. Learning the basic fundamental teaching skills is the first step in building a successful career as an instructor. The course focuses on teaching and helping you develop those basic skills and knowledge expected of an instructor. Objectives The basic instructor training course has been designed to provide those attending with the basic teaching skills needed to function as a basic entry level instructor. The course will also provide those attending a thorough overview of the current methods and theories of training developments and instructional techniques used in business and industry. Who should attend? All those wish to enter into the world of training of personnel at all levels of the business, both in formal and informal situations. Objectives: At the end of this course the attendees will have a working knowledge of the basic requirements to: * Plan, develop, and write training objectives. * Develop and write lesson plans. * Develop training aids. * Build and maintain good presentation skills. * Define evaluation and testing methods. The course of instruction will be an instructor-led presentation, with learner's involvement and participation being the key method of learning used throughout the training session. Register Now! Global Knowledge Associates, Inc. 2502B West Tower, PSE Bldg. Exchange Road, Ortigas Center, Pasig City Tel. Nos. 683-0969 | 637-3657 Email: sally at globalknowledgeph.com; roselle at globalknowledgeph.com ++++++++++++++++++++++++++++++++++++++++ Organize Yourself for Success 1-Day | July 10, 2007 | 9am - 5pm | P 2,995 + VAT / pax Penthouse East Tower, PSE Bldg. Exchange Road, Ortigas Center You know how important time/self management is to getting your work done and accomplishing your goals. This one-day seminar provides the skills and tools to help you balance the demands on your time, focus on your priorities, and accomplish what matters most to you - in both personal and professional areas - during and after the program. Accomplish how to use any personal organizing system combined with an 8-step formula for consistently hitting your goals. Core Competency You must not only learn to manage yourself in regards to what you want to accomplish, but also to work effective within a group. Individual priorities and personalities can interrupt a group's flow, leading to inefficiency and costly delays. Outcomes Become more effective at: Managing Choices Setting Priorities Telephone Communications Personal Planning Project Management Strategic Planning Handling Interruptions Delegation Decision Making Leadership Accomplishing Goals Motivation Target Audience The target audience is anyone interested in becoming more effective in all areas of life. Register Now! Global Knowledge Associates, Inc. 2502B West Tower, PSE Bldg. Exchange Road, Ortigas Center, Pasig City Tel. Nos. 683-0969 | 637-3657 Email: sally at globalknowledgeph.com; roselle at globalknowledgeph.com This email is intended for our friends and associates in the Philippines. If you have received this email by mistake, kindly accept our apologies and send a blank email with the words "remove" in the subject line to sandramedalla at gmail.com . _____ If you want to unsubscribe from this mailing list. Please Click it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-checkins/attachments/20070629/e44719c1/attachment.html From nnorwitz at gmail.com Fri Jun 29 23:43:25 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Fri, 29 Jun 2007 17:43:25 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070629214325.GA29586@python.psfb.org> test_popen2 leaked [-26, 49, -49] references, sum=-26 test_sys leaked [-129, 0, 132] references, sum=3 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From nnorwitz at gmail.com Sat Jun 30 11:43:48 2007 From: nnorwitz at gmail.com (Neal Norwitz) Date: Sat, 30 Jun 2007 05:43:48 -0400 Subject: [Python-checkins] Python Regression Test Failures refleak (1) Message-ID: <20070630094348.GA8150@python.psfb.org> test_popen2 leaked [-49, 49, -49] references, sum=-49 test_sys leaked [0, 0, 132] references, sum=132 test_urllib2_localnet leaked [3, 3, 3] references, sum=9 From python-checkins at python.org Sat Jun 30 13:01:02 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 30 Jun 2007 13:01:02 +0200 (CEST) Subject: [Python-checkins] r56129 - python/trunk/Doc/lib/libsmtplib.tex Message-ID: <20070630110102.0A5DC1E400A@bag.python.org> Author: georg.brandl Date: Sat Jun 30 13:01:01 2007 New Revision: 56129 Modified: python/trunk/Doc/lib/libsmtplib.tex Log: Document smtp.SMTPAuthenticationError. Modified: python/trunk/Doc/lib/libsmtplib.tex ============================================================================== --- python/trunk/Doc/lib/libsmtplib.tex (original) +++ python/trunk/Doc/lib/libsmtplib.tex Sat Jun 30 13:01:01 2007 @@ -113,6 +113,10 @@ The server refused our \samp{HELO} message. \end{excdesc} +\begin{excdesc}{SMTPAuthenticationError} + SMTP authentication went wrong. Most probably the server didn't accept + the username/password combination provided. +\end{excdesc} \begin{seealso} \seerfc{821}{Simple Mail Transfer Protocol}{Protocol definition for From python-checkins at python.org Sat Jun 30 13:01:05 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 30 Jun 2007 13:01:05 +0200 (CEST) Subject: [Python-checkins] r56130 - python/branches/release25-maint/Doc/lib/libsmtplib.tex Message-ID: <20070630110105.65CF81E400F@bag.python.org> Author: georg.brandl Date: Sat Jun 30 13:01:05 2007 New Revision: 56130 Modified: python/branches/release25-maint/Doc/lib/libsmtplib.tex Log: Document smtp.SMTPAuthenticationError. (backport from rev. 56129) Modified: python/branches/release25-maint/Doc/lib/libsmtplib.tex ============================================================================== --- python/branches/release25-maint/Doc/lib/libsmtplib.tex (original) +++ python/branches/release25-maint/Doc/lib/libsmtplib.tex Sat Jun 30 13:01:05 2007 @@ -74,6 +74,10 @@ The server refused our \samp{HELO} message. \end{excdesc} +\begin{excdesc}{SMTPAuthenticationError} + SMTP authentication went wrong. Most probably the server didn't accept + the username/password combination provided. +\end{excdesc} \begin{seealso} \seerfc{821}{Simple Mail Transfer Protocol}{Protocol definition for From python-checkins at python.org Sat Jun 30 20:31:14 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 30 Jun 2007 20:31:14 +0200 (CEST) Subject: [Python-checkins] r56131 - peps/trunk/pep-0000.txt peps/trunk/pep-3136.txt Message-ID: <20070630183114.7CD061E4002@bag.python.org> Author: georg.brandl Date: Sat Jun 30 20:31:14 2007 New Revision: 56131 Added: peps/trunk/pep-3136.txt Modified: peps/trunk/pep-0000.txt Log: Add PEP 3136 by Matt Chisholm, ``Labeled break and continue''. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Sat Jun 30 20:31:14 2007 @@ -103,6 +103,7 @@ S 3124 Overloading, Generic Functions, Interfaces Eby S 3134 Exception Chaining and Embedded Tracebacks Yee S 3135 New Super Spealman, Delaney + S 3136 Labeled break and continue Chisholm S 3141 A Type Hierarchy for Numbers Yasskin Finished PEPs (done, implemented in Subversion) @@ -505,6 +506,7 @@ SR 3133 Introducing Roles Winter S 3134 Exception Chaining and Embedded Tracebacks Yee S 3135 New Super Spealman, Delaney + S 3136 Labeled break and continue Chisholm S 3141 A Type Hierarchy for Numbers Yasskin @@ -541,6 +543,7 @@ Cannon, Brett brett at python.org Carlson, Josiah jcarlson at uci.edu Carroll, W Isaac icarroll at pobox.com + Chisholm, Matt matt-python at theory.org Coghlan, Nick ncoghlan at gmail.com Cole, Dave djc at object-craft.com.au Craig, Christopher python-pep at ccraig.org Added: peps/trunk/pep-3136.txt ============================================================================== --- (empty file) +++ peps/trunk/pep-3136.txt Sat Jun 30 20:31:14 2007 @@ -0,0 +1,485 @@ +PEP: 3136 +Title: Labeled break and continue +Version: $Revision$ +Last-Modified: $Date$ +Author: Matt Chisholm +Status: Draft +Type: Standards Track +Content-Type: text/x-rst +Created: 30-Jun-2007 +Python-Version: 3.1 +Post-History: + + +Abstract +======== + +This PEP proposes support for labels in Python's ``break`` and +``continue`` statements. It is inspired by labeled ``break`` and +``continue`` in other languages, and the author's own infrequent but +persistent need for such a feature. + + +Introduction +============ + +The ``break`` statement allows the programmer to terminate a loop +early, and the ``continue`` statement allows the programmer to move to +the next iteration of a loop early. In Python currently, ``break`` +and ``continue`` can apply only to the innermost enclosing loop. + +Adding support for labels to the ``break`` and ``continue`` statements +is a logical extension to the existing behavior of the ``break`` and +``continue`` statements. Labeled ``break`` and ``continue`` can +improve the readability and flexibility of complex code which uses +nested loops. + +For brevity's sake, the examples and discussion in this PEP usually +refers to the ``break`` statement. However, all of the examples and +motivations apply equally to labeled ``continue``. + + +Motivation +========== + +If the programmer wishes to move to the next iteration of an outer +enclosing loop, or terminate multiple loops at once, he or she has a +few less-than elegant options. + +Here's one common way of imitating labeled ``break`` in Python (For +this and future examples, ``...`` denotes an arbitrary number of +intervening lines of code):: + + for a in a_list: + time_to_break_out_of_a = False + ... + for b in b_list: + ... + if condition_one(a, b): + break + ... + if condition_two(a, b): + time_to_break_out_of_a = True + break + ... + if time_to_break_out_of_a: + break + ... + + +This requires five lines and an extra variable, +``time_to_break_out_of_a``, to keep track of when to break out of the +outer (a) loop. And those five lines are spread across many lines of +code, making the control flow difficult to understand. + +This technique is also error-prone. A programmer modifying this code +might inadvertently put new code after the end of the inner (b) loop +but before the test for ``time_to_break_out_of_a``, instead of after +the test. This means that code which should have been skipped by +breaking out of the outer loop gets executed incorrectly. + +This could also be written with an exception. The programmer would +declare a special exception, wrap the inner loop in a try, and catch +the exception and break when you see it:: + + class BreakOutOfALoop(Exception): pass + + for a in a_list: + ... + try: + for b in b_list: + ... + if condition_one(a, b): + break + ... + if condition_two(a, b): + raise BreakOutOfALoop + ... + except BreakOutOfALoop: + break + ... + + +Again, though; this requires five lines and a new, single-purpose +exception class (instead of a new variable), and spreads basic control +flow out over many lines. And it breaks out of the inner loop with +``break`` and out of the other loop with an exception, which is +inelegant. [#toowtdi]_ + +This next strategy might be the most elegant solution, assuming +condition_two() is inexpensive to compute:: + + for a in a_list: + ... + for b in b_list: + ... + if condition_one(a, b): + break + ... + if condition_two(a, b): + break + ... + if condition_two(a, b) + break + ... + + +Breaking twice is still inelegant. This implementation also relies on +the fact that the inner (b) loop bleeds b into the outer for loop, +which (although explicitly supported) is both surprising to novices, +and in my opinion counter-intuitive and poor practice. + +The programmer must also still remember to put in both breaks on +condition two and not insert code before the second break. A single +conceptual action, breaking out of both loops on condition_two(), +requires four lines of code at two indentation levels, possibly +separated by many intervening lines at the end of the inner (b) loop. + + +Other languages +--------------- + +Now, put aside whatever dislike you may have for other programming +languages, and consider the syntax of labeled ``break`` and +``continue``. In Perl:: + + ALOOP: foreach $a (@a_array){ + ... + BLOOP: foreach $b (@b_array){ + ... + if (condition_one($a,$b)){ + last BLOOP; # same as plain old last; + } + ... + if (condition_two($a,$b)){ + last ALOOP; + } + ... + } + ... + } + + +(Notes: Perl uses ``last`` instead of ``break``. The BLOOP labels +could be omitted; ``last`` and ``continue`` apply to the innermost +loop by default.) + +PHP uses a number denoting the number of loops to break out of, rather +than a label:: + + foreach ($a_array as $a){ + .... + foreach ($b_array as $b){ + .... + if (condition_one($a, $b)){ + break 1; # same as plain old break + } + .... + if (condition_two($a, $b)){ + break 2; + } + .... + } + ... + } + + +C/C++, Java, and Ruby all have similar constructions. + +The control flow regarding when to break out of the outer (a) loop is +fully encapsulated in the ``break`` statement which gets executed when +the break condition is satisfied. The depth of the break statement +does not matter. Control flow is not spread out. No extra variables, +exceptions, or re-checking or storing of control conditions is +required. There is no danger that code will get inadvertently +inserted after the end of the inner (b) loop and before the break +condition is re-checked inside the outer (a) loop. These are the +benefits that labeled ``break`` and ``continue`` would bring to +Python. + + +What this PEP is not +==================== + +This PEP is not a proposal to add GOTO to Python. GOTO allows a +programmer to jump to an arbitrary block or line of code, and +generally makes control flow more difficult to follow. Although +``break`` and ``continue`` (with or without support for labels) can be +considered a type of GOTO, it is much more restricted. Another Python +construct, ``yield``, could also be considered a form of GOTO -- an +even less restrictive one. The goal of this PEP is to propose an +extension to the existing control flow tools ``break`` and +``continue``, to make control flow easier to understand, not more +difficult. + +Labeled ``break`` and ``continue`` cannot transfer control to another +function or method. They cannot even transfer control to an arbitrary +line of code in the current scope. Currently, they can only affect +the behavior of a loop, and are quite different and much more +restricted than GOTO. This extension allows them to affect any +enclosing loop in the current name-space, but it does not change their +behavior to that of GOTO. + + +Specification +============= + +Under all of these proposals, ``break`` and ``continue`` by themselves +will continue to behave as they currently do, applying to the +innermost loop by default. + + +Proposal A - Explicit labels +---------------------------- + +The for and while loop syntax will be followed by an optional ``as`` +or ``label`` (contextual) keyword [#keyword]_ and then an identifier, +which may be used to identify the loop out of which to break (or which +should be continued). + +The ``break`` (and ``continue``) statements will be followed by an +optional identifier that refers to the loop out of which to break (or +which should be continued). Here is an example using the ``as`` +keyword:: + + for a in a_list as a_loop: + ... + for b in b_list as b_loop: + ... + if condition_one(a, b): + break b_loop # same as plain old break + ... + if condition_two(a, b): + break a_loop + ... + ... + +Or, with ``label`` instead of ``as``:: + + for a in a_list label a_loop: + ... + for b in b_list label b_loop: + ... + if condition_one(a, b): + break b_loop # same as plain old break + ... + if condition_two(a, b): + break a_loop + ... + ... + + +This has all the benefits outlined above. It requires modifications +to the language syntax: the syntax of ``break`` and ``continue`` +syntax statements and for and while statements. It requires either a +new conditional keyword ``label`` or an extension to the conditional +keyword ``as``. [#as]_ It is unlikely to require any changes to +existing Python programs. Passing an identifier not defined in the +local scope to ``break`` or ``continue`` would raise a NameError. + + +Proposal B - Numeric break & continue +------------------------------------- + +Rather than altering the syntax of ``for`` and ``while`` loops, +``break`` and ``continue`` would take a numeric argument denoting the +enclosing loop which is being controlled, similar to PHP. + +It seems more Pythonic to me for ``break`` and ``continue`` to refer +to loops indexing from zero, as opposed to indexing from one as PHP +does. + +:: + + for a in a_list: + ... + for b in b_list: + ... + if condition_one(a,b): + break 0 # same as plain old break + ... + if condition_two(a,b): + break 1 + ... + ... + +Passing a number that was too large, or less than zero, or non-integer +to ``break`` or ``continue`` would (probably) raise an IndexError. + +This proposal would not require any changes to existing Python +programs. + + +Proposal C - The reduplicative method +------------------------------------- + +The syntax of ``break`` and ``continue`` would be altered to allow +multiple ``break`` and continue statements on the same line. Thus, +``break break`` would break out of the first and second enclosing +loops. + +:: + + for a in a_list: + ... + for b in b_list: + ... + if condition_one(a,b): + break # plain old break + ... + if condition_two(a,b): + break break + ... + ... + + +This would also allow the programmer to break out of the inner loop +and continue the next outermost simply by writing ``break continue``, +[#breakcontinue]_ and so on. I'm not sure what exception would be +raised if the programmer used more ``break`` or ``continue`` +statements than existing loops (perhaps a SyntaxError?). + +I expect this proposal to get rejected because it will be judged too +difficult to understand. + +This proposal would not require any changes to existing Python +programs. + + +Proposal D - Explicit iterators +------------------------------- + +Rather than embellishing for and while loop syntax with labels, the +programmer wishing to use labeled breaks would be required to create +the iterator explicitly and assign it to a identifier if he or she +wanted to ``break`` out of or ``continue`` that loop from within a +deeper loop. + +:: + + a_iter = iter(a_list) + for a in a_iter: + ... + b_iter = iter(b_list) + for b in b_iter: + ... + if condition_one(a,b): + break b_iter # same as plain old break + ... + if condition_two(a,b): + break a_iter + ... + ... + + +Passing a non-iterator object to ``break`` or ``continue`` would raise +a TypeError; and a nonexistent identifier would raise a NameError. +This proposal requires only one extra line to create a labeled loop, +and no extra lines to break out of a containing loop, and no changes +to existing Python programs. + + +Proposal E - Explicit iterators and iterator methods +---------------------------------------------------- + +This is a variant of Proposal D. Iterators would need be created +explicitly if anything other that the most basic use of ``break`` and +``continue`` was required. Instead of modifying the syntax of +``break`` and ``continue``, ``.break()`` and ``.continue()`` methods +could be added to the Iterator type. + +:: + + a_iter = iter(a_list) + for a in a_iter: + ... + b_iter = iter(b_list) + for b in b_iter: + ... + if condition_one(a,b): + b_iter.break() # same as plain old break + ... + if condition_two(a,b): + a_iter.break() + ... + ... + + +I expect that this proposal will get rejected on the grounds of sheer +ugliness. However, it requires no changes to the language syntax +whatsoever, nor does it require any changes to existing Python +programs. + + +Implementation +============== + +I have never looked at the Python language implementation itself, so I +have no idea how difficult this would be to implement. If this PEP is +accepted, but no one is available to write the feature, I will try to +implement it myself. + + +Footnotes +========= + +.. [#toowtdi] Breaking some loops with exceptions is inelegant because + it's a violation of There's Only One Way To Do It. + +.. [#keyword] Or really any new contextual keyword that the community + likes: ``as``, ``label``, ``labeled``, ``loop``, ``name``, ``named``, + ``walrus``, whatever. + +.. [#as] The use of ``as`` in a similar context has been proposed here, + http://sourceforge.net/tracker/index.php?func=detail&aid=1714448&group_id=5470&atid=355470 + but to my knowledge this idea has not been written up as a PEP. + +.. [#breakcontinue] To continue the Nth outer loop, you would write + break N-1 times and then continue. Only one ``continue`` would be + allowed, and only at the end of a sequence of breaks. ``continue + break`` or ``continue continue`` makes no sense. + + +Resources +========= + +This issue has come up before, although it has never been resolved, to +my knowledge. + +* `labeled breaks`__, on comp.lang.python, in the context of + ``do...while`` loops + + __ http://groups.google.com/group/comp.lang.python/browse_thread/thread/6da848f762c9cf58/979ca3cd42633b52?lnk=gst&q=labeled+break&rnum=3#979ca3cd42633b52 + +* `break LABEL vs. exceptions + PROPOSAL`__, on python-list, as + compared to using Exceptions for flow control + + __ http://mail.python.org/pipermail/python-list/1999-September/#11080 + +* `Named code blocks`__ on python-list, a suggestion motivated by the + desire for labeled break / continue + + __ http://mail.python.org/pipermail/python-list/2001-April/#78439 + +* `mod_python bug fix`__ An example of someone setting a flag inside + an inner loop that triggers a continue in the containing loop, to + work around the absence of labeled break and continue + + __ http://mail-archives.apache.org/mod_mbox/httpd-python-cvs/200511.mbox/%3C20051112204322.4010.qmail at minotaur.apache.org%3E + + +Copyright +========= + +This document has been placed in the public domain. + + + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + coding: utf-8 + End: From python-checkins at python.org Sat Jun 30 20:33:58 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 30 Jun 2007 20:33:58 +0200 (CEST) Subject: [Python-checkins] r56132 - peps/trunk/pep-3136.txt Message-ID: <20070630183358.CD4A11E4002@bag.python.org> Author: georg.brandl Date: Sat Jun 30 20:33:58 2007 New Revision: 56132 Modified: peps/trunk/pep-3136.txt (props changed) Log: Add correct svn props to new PEP. From python-checkins at python.org Sat Jun 30 21:07:03 2007 From: python-checkins at python.org (georg.brandl) Date: Sat, 30 Jun 2007 21:07:03 +0200 (CEST) Subject: [Python-checkins] r56133 - peps/trunk/pep-0000.txt peps/trunk/pep-0368.txt Message-ID: <20070630190703.D9D5A1E4002@bag.python.org> Author: georg.brandl Date: Sat Jun 30 21:07:03 2007 New Revision: 56133 Added: peps/trunk/pep-0368.txt (contents, props changed) Modified: peps/trunk/pep-0000.txt Log: Add PEP 368, ``Standard image protocol and class'', by L. Mastrodomenico. Modified: peps/trunk/pep-0000.txt ============================================================================== --- peps/trunk/pep-0000.txt (original) +++ peps/trunk/pep-0000.txt Sat Jun 30 21:07:03 2007 @@ -96,6 +96,7 @@ S 364 Transitioning to the Py3K Standard Library Warsaw S 365 Adding the pkg_resources module Eby S 366 Main module explicit relative imports Coghlan + S 368 Standard image protocol and class Mastrodomenico S 3101 Advanced String Formatting Talin S 3108 Standard Library Reorganization Cannon S 3116 New I/O Stutzbach, Verdone, GvR @@ -464,6 +465,7 @@ S 365 Adding the pkg_resources module Eby S 366 Main module explicit relative imports Coghlan SR 367 New Super Spealman, Delaney + S 368 Standard image protocol and class Mastrodomenico SR 666 Reject Foolish Indentation Creighton SR 754 IEEE 754 Floating Point Special Values Warnes P 3000 Python 3000 GvR @@ -584,6 +586,7 @@ von L?wis, Martin martin at v.loewis.de Lownds, Tony tony at pagedna.com Martelli, Alex aleaxit at gmail.com + Mastrodomenico, Lino l.mastrodomenico at gmail.com Maupin, Patrick pmaupin at gmail.com McClelland, Andrew eternalsquire at comcast.net McMillan, Gordon gmcm at hypernet.com Added: peps/trunk/pep-0368.txt ============================================================================== --- (empty file) +++ peps/trunk/pep-0368.txt Sat Jun 30 21:07:03 2007 @@ -0,0 +1,844 @@ +PEP: 368 +Title: Standard image protocol and class +Version: $Revision$ +Last-Modified: $Date$ +Author: Lino Mastrodomenico +Status: Draft +Type: Standards Track +Content-Type: text/x-rst +Created: 28-Jun-2007 +Python-Version: 2.6, 3.0 +Post-History: + + +Abstract +======== + +The current situation of image storage and manipulation in the Python +world is extremely fragmented: almost every library that uses image +objects has implemented its own image class, incompatible with +everyone else's and often not very pythonic. A basic RGB image class +exists in the standard library (``Tkinter.PhotoImage``), but is pretty +much unusable, and unused, for anything except Tkinter programming. + +This fragmentation not only takes up valuable space in the developers +minds, but also makes the exchange of images between different +libraries (needed in relatively common use cases) slower and more +complex than it needs to be. + +This PEP proposes to improve the situation by defining a simple and +pythonic image protocol/interface that can be hopefully accepted and +implemented by existing image classes inside and outside the standard +library *without breaking backward compatibility* with their existing +user bases. In practice this is a definition of how a minimal +*image-like* object should look and act (in a similar way to the +``read()`` and ``write()`` methods in *file-like* objects). + +The inclusion in the standard library of a class that provides basic +image manipulation functionality and implements the new protocol is +also proposed, together with a mixin class that helps adding support +for the protocol to existing image classes. + + +Rationale +========= + +A good way to have high quality modules ready for inclusion in the +Python standard library is to simply wait for natural selection among +competing external libraries to provide a clear winner with useful +functionality and a big user base. Then the de-facto standard can be +officially sanctioned by including it in the standard library. + +Unfortunately this approach hasn't worked well for the creation of a +dominant image class in the Python world: almost every third-party +library that requires an image object creates its own class +incompatible with the ones from other libraries. This is a real +problem because it's entirely reasonable for a program to create and +manipulate an image using, e.g., PIL (the Python Imaging Library) and +then display it using wxPython or pygame. But these libraries have +different and incompatible image classes, and the usual solution is to +manually "export" an image from the source to a (width, height, +bytes_string) tuple and "import" it creating a new instance in the +target format. This approach *works*, but is both uglier and slower +than it needs to be. + +Another "solution" that has been sometimes used is the creation of +specific adapters and/or converters from a class to another (e.g. PIL +offers the ``ImageTk`` module for converting PIL images to a class +compatible with the Tkinter one). But this approach doesn't scale +well with the number of libraries involved and it's still annoying for +the user: if I have a perfectly good image object why should I convert +before passing it to the next method, why can't it simply accept my +image as-is? + +The problem isn't by any stretch limited to the three mentioned +libraries and has probably multiple causes, including two that IMO are +very important to understand before solving it: + +* in today's computing world an image is a basic type not strictly + tied to a specific domain. This is why there will never be a clear + winner between the image classes from the three libraries mentioned + above (PIL, wxPython and pygame): they cover different domains and + don't really compete with each other; + +* the Python standard library has never provided a good image class + that can be adopted or imitated by third part modules. + ``Tkinter.PhotoImage`` provides basic RGB functionality, but it's by + far the slowest and ugliest of the bunch and it can be instantiated + only after the Tkinter root window has been created. + +This PEP tries to improve this situation in four ways: + +1. It defines a simple and pythonic image protocol/interface (both on + the Python and the C side) that can be hopefully accepted and + implemented by existing image classes inside and outside the + standard library *without breaking backward compatibility* with + their existing user bases. + +2. It proposes the inclusion in the standard library of three new + classes: + + * ``ImageMixin`` provides almost everything necessary to implement + the new protocol; its main purpose is to make as simple as + possible to support this interface for existing libraries, in + some cases as simple as adding it to the list of base classes and + doing minor additions to the constructor. + + * ``Image`` is a subclass of ``ImageMixin`` and will add a + constructor that can resize and/or convert an image between + different pixel formats. This is intended to provide a fast and + efficient default implementation of the new protocol. + + * ``ImageSize`` is a minor helper class. See below for details. + +3. ``Tkinter.PhotoImage`` will implement the new protocol (mostly + through the ``ImageMixin`` class) and all the Tkinter methods that + can receive an image will be modified the accept any object that + implements the interface. As an aside the author of this PEP will + collaborate with the developers of the most common external + libraries to achieve the same goal (supporting the protocol in + their classes and accepting any class that implements it). + +4. New ``PyImage_*`` functions will be added to the CPython C API: + they implement the C side of the protocol and accept as first + parameter **any** object that supports it, even if it isn't an + instance of the ``Image``/``ImageMixin`` classes. + +The main effects for the end user will be a simplification of the +interchange of images between different libraries (if everything goes +well, any Python library will accept images from any other library) +and the out-of-the-box availability of the new ``Image`` class. The +new class is intended to cover simple but common use cases like +cropping and/or resizing a photograph to the desired size and passing +it an appropriate widget for displaying it on a window, or darkening a +texture and passing it to a 3D library. + +The ``Image`` class is not intended to replace or compete with PIL, +Pythonmagick or NumPy, even if it provides a (very small) subset of +the functionality of these three libraries. In particular PIL offers +very rich image manipulation features with *dozens* of classes, +filters, transformations and file formats. The inclusion of PIL (or +something similar) in the standard library may, or may not, be a +worthy goal but it's completely outside the scope of this PEP. + + +Specification +============= + +The ``imageop`` module is used as the *default* location for the new +classes and objects because it has for a long time hosted functions +that provided a somewhat similar functionality, but a new module may +be created if preferred (e.g. a new "``image``" or "``media``" module; +the latter may eventually include other multimedia classes). + +``MODES`` is a new module level constant: it is a set of the pixel +formats supported by the ``Image`` class. Any image object that +implements the new protocol is guaranteed to be formatted in one of +these modes, but libraries that accept images are allowed to support +only a subset of them. + +These modes are in turn also available as module level constants (e.g. +``imageop.RGB``). + +The following table is a summary of the modes currently supported and +their properties: + +========= =============== ========= =========== ====================== + Name Component Bits per Subsampling Valid + names component intervals +========= =============== ========= =========== ====================== +L l (lowercase L) 8 no full range +L16 l 16 no full range +L32 l 32 no full range +LA l, a 8 no full range +LA32 l, a 16 no full range +RGB r, g, b 8 no full range +RGB48 r, g, b 16 no full range +RGBA r, g, b, a 8 no full range +RGBA64 r, g, b, a 16 no full range +YV12 y, cr, cb 8 1, 2, 2 16-235, 16-240, 16-240 +JPEG_YV12 y, cr, cb 8 1, 2, 2 full range +CMYK c, m, y, k 8 no full range +CMYK64 c, m, y, k 16 no full range +========= =============== ========= =========== ====================== + +When the name of a mode ends with a number, it represents the average +number of bits per pixel. All the other modes simply use a byte per +component per pixel. + +No palette modes or modes with less than 8 bits per component are +supported. Welcome to the 21st century. + +Here's a quick description of the modes and the rationale for their +inclusion; there are four groups of modes: + +1. **grayscale** (``L*`` modes): they are heavily used in scientific + computing (those people may also need a very high dynamic range and + precision, hence ``L32``, the only mode with 32 bits per component) + and sometimes it can be useful to consider a single component of a + color image as a grayscale image (this is used by the individual + planes of the planar images, see ``YV12`` below); the name of the + component (``'l'``, lowercase letter L) stands for luminance, the + second optional component (``'a'``) is the alpha value and + represents the opacity of the pixels: alpha = 0 means full + transparency, alpha = 255/65535 represents a fully opaque pixel; + +2. **RGB\* modes**: the garden variety color images. The optional + alpha component has the same meaning as in grayscale modes; + +3. **YCbCr**, a.k.a. YUV (``*YV12`` modes). These modes are planar + (i.e. the values of all the pixel for each component are stored in + a consecutive memory area, instead of the usual arrangement where + all the components of a pixel reside in consecutive bytes) and use + a 1, 2, 2 (a.k.a. 4:2:0) subsampling (i.e. each pixel has its own Y + value, but the Cb and Cr components are shared between groups of + 2x2 adjacent pixels) because this is the format that's by far the + most common for YCbCr images. Please note that the V (Cr) plane is + stored before the U (Cb) plane. + + ``YV12`` is commonly used for MPEG2 (including DVDs), MPEG4 (both + ASP/DivX and AVC/H.264) and Theora video frames. Valid values for + Y are in range(16, 236) (excluding 236), and valid values for Cb + and Cr are in range(16, 241). ``JPEG_YV12`` is similar to + ``YV12``, but the three components can have the full range of 256 + values. It's the native format used by almost all JPEG/JFIF files + and by MJPEG video frames. The "strangeness" of these two wrt all + the other supported modes derives from the fact that they are + widely used that way by a lot of existing libraries and + applications; this is also the reason why they are included (and + the fact that they can't losslessly converted to RGB because YCbCr + is a bigger color space); the funny 4:2:0 planar arrangement of the + pixel values is relatively easy to support because in most cases + the three planes can be considered three separate grayscale images; + +4. **CMYK\* modes** (cyan, magenta, yellow and black) are subtractive + color modes, used for printing color images on dead trees. + Professional designers love to pretend that they can't live without + them, so here they are. + + +Python API +---------- + +See the examples_ below. + +In Python 2.x, all the new classes defined here are new-style classes. + + +Mode Objects +'''''''''''' + +The mode objects offer a number of attributes and methods that can be +used for implementing generic algorithms that work on different types +of images: + +``components`` + + The number of components per pixel (e.g. 4 for an RGBA image). + +``component_names`` + + A tuple of strings; see the column "Component names" in the above + table. + +``bits_per_component`` + + 8, 16 or 32; see "Bits per component" in the above table. + +``bytes_per_pixel`` + + ``components * bits_per_component // 8``, only available for non + planar modes (see below). + +``planar`` + + Boolean; ``True`` if the image components reside each in a + separate plane. Currently this happens if and only if the mode + uses subsampling. + +``subsampling`` + + A tuple that for each component in the mode contains a tuple of + two integers that represent the amount of downsampling in the + horizontal and vertical direction, respectively. In practice it's + ``((1, 1), (2, 2), (2, 2))`` for ``YV12`` and ``JPEG_YV12`` and + ``((1, 1),) * components`` for everything else. + +``x_divisor`` + + ``max(x for x, y in subsampling)``; the width of an image that + uses this mode must be divisible for this value. + +``y_divisor`` + + ``max(y for x, y in subsampling)``; the height of an image that + uses this mode must be divisible for this value. + +``intervals`` + + A tuple that for each component in the mode contains a tuple of + two integers: the minimum and maximum valid value for the + component. Its value is ``((16, 235), (16, 240), (16, 240))`` for + ``YV12`` and ``((0, 2 ** bits_per_component - 1),) * components`` + for everything else. + +``get_length(iterable[integer]) -> int`` + + The parameter must be an iterable that contains two integers: the + width and height of an image; it returns the number of bytes + needed to store an image of these dimensions with this mode. + +Implementation detail: the modes are instances of a subclass of +``str`` and have a value equal to their name (e.g. ``imageop.RGB == +'RGB'``) except for ``L32`` that has value ``'I'``. This is only +intended for backward compatibility with existing PIL users; new code +that uses the image protocol proposed here should not rely on this +detail. + + +Image Protocol +'''''''''''''' + +Any object that supports the image protocol must provide the following +methods and attributes: + +``mode`` + + The format and the arrangement of the pixels in this image; it's + one of the constants in the ``MODES`` set. + +``size`` + + An instance of the `ImageSize class`_; it's a named tuple of two + integers: the width and the height of the image in pixels; both of + them must be >= 1 and can also be accessed as the ``width`` and + ``height`` attributes of ``size``. + +``buffer`` + + A sequence of integers between 0 and 255; they are the actual + bytes used for storing the image data (i.e. modifying their values + affects the image pixels and vice versa); the data has a + row-major/C-contiguous order without padding and without any + special memory alignment, even when there are more than 8 bits per + component. The only supported methods are ``__len__``, + ``__getitem__``/``__setitem__`` (with both integers and slice + indexes) and ``__iter__``; on the C side it implements the buffer + protocol. + + This is a pretty low level interface to the image and the user is + responsible for using the correct (native) byte order for modes + with more than 8 bit per component and the correct value ranges + for ``YV12`` images. A buffer may or may not keep a reference to + its image, but it's still safe (if useless) to use the buffer even + after the corresponding image has been destroyed by the garbage + collector (this will require changes to the image class of + wxPython and possibly other libraries). Implementation detail: + this can be an ``array('B')``, a ``bytes()`` object or a + specialized fixed-length type. + +``info`` + + A ``dict`` object that can contain arbitrary metadata associated + with the image (e.g. DPI, gamma, ICC profile, exposure time...); + the interpretation of this data is beyond the scope of this PEP + and probably depends on the library used to create and/or to save + the image; if a method of the image returns a new image, it can + copy or adapt metadata from its own ``info`` attribute (the + ``ImageMixin`` implementation always creates a new image with an + empty ``info`` dictionary). + +| ``bits_per_component`` +| ``bytes_per_pixel`` +| ``component_names`` +| ``components`` +| ``intervals`` +| ``planar`` +| ``subsampling`` + + Shortcuts for the corresponding ``mode.*`` attributes. + +``map(function[, function...]) -> None`` + + For every pixel in the image, maps each component through the + corresponding function. If only one function is passed, it is + used repeatedly for each component. This method modifies the + image **in place** and is usually very fast (most of the time the + functions are called only a small number of times, possibly only + once for simple functions without branches), but it imposes a + number of restrictions on the function(s) passed: + + * it must accept a single integer argument and return a number + (``map`` will round the result to the nearest integer and clip + it to ``range(0, 2 ** bits_per_component)``, if necessary); + + * it must *not* try to intercept any ``BaseException``, + ``Exception`` or any unknown subclass of ``Exception`` raised by + any operation on the argument (implementations may try to + optimize the speed by passing funny objects, so even a simple + ``"if n == 10:"`` may raise an exception: simply ignore it, + ``map`` will take care of it); catching any other exception is + fine; + + * it should be side-effect free and its result should not depend + on values (other than the argument) that may change during a + single invocation of ``map``. + +| ``rotate90() -> image`` +| ``rotate180() -> image`` +| ``rotate270() -> image`` + + Return a copy of the image rotated 90, 180 or 270 degrees + counterclockwise around its center. + +``clip() -> None`` + + Saturates invalid component values in ``YV12`` images to the + minimum or the maximum allowed (see ``mode.intervals``), for other + image modes this method does nothing, very fast; libraries that + save/export ``YV12`` images are encouraged to always call this + method, since intermediate operations (e.g. the ``map`` method) + may assign to pixels values outside the valid intervals. + +``split() -> tuple[image]`` + + Returns a tuple of ``L``, ``L16`` or ``L32`` images corresponding + to the individual components in the image. + +Planar images also supports attributes with the same names defined in +``component_names``: they contain grayscale (mode ``L``) images that +offer a view on the pixel values for the corresponding component; any +change to the subimages is immediately reflected on the parent image +and vice versa (their buffers refer to the same memory location). + +Non-planar images offer the following additional methods: + +``pixels() -> iterator[pixel]`` + + Returns an iterator that iterates over all the pixels in the + image, starting from the top line and scanning each line from left + to right. See below for a description of the `pixel objects`_. + +``__iter__() -> iterator[line]`` + + Returns an iterator that iterates over all the lines in the image, + from top to bottom. See below for a description of the `line + objects`_. + +``__len__() -> int`` + + Returns the number of lines in the image (``size.height``). + +``__getitem__(integer) -> line`` + + Returns the line at the specified (y) position. + +``__getitem__(tuple[integer]) -> pixel`` + + The parameter must be a tuple of two integers; they are + interpreted respectively as x and y coordinates in the image (0, 0 + is the top left corner) and a pixel object is returned. + +``__getitem__(slice | tuple[integer | slice]) -> image`` + + The parameter must be a slice or a tuple that contains two slices + or an integer and a slice; the selected area of the image is + copied and a new image is returned; ``image[x:y:z]`` is equivalent + to ``image[:, x:y:z]``. + +``__setitem__(tuple[integer], integer | iterable[integer]) -> None`` + + Modifies the pixel at specified position; ``image[x, y] = + integer`` is a shortcut for ``image[x, y] = (integer,)`` for + images with a single component. + +``__setitem__(slice | tuple[integer | slice], image) -> None`` + + Selects an area in the same way as the corresponding form of the + ``__getitem__`` method and assigns to it a copy of the pixels from + the image in the second argument, that must have exactly the same + mode as this image and the same size as the specified area; the + alpha component, if present, is simply copied and doesn't affect + the other components of the image (i.e. no alpha compositing is + performed). + +The ``mode``, ``size`` and ``buffer`` (including the address in memory +of the ``buffer``) never change after an image is created. + +It is expected that, if PEP 3118 is accepted, all the image objects +will support the new buffer protocol, however this is beyond the scope +of this PEP. + + +``Image`` and ``ImageMixin`` Classes +'''''''''''''''''''''''''''''''''''' + +The ``ImageMixin`` class implements all the methods and attributes +described above except ``mode``, ``size``, ``buffer`` and ``info``. +``Image`` is a subclass of ``ImageMixin`` that adds support for these +four attributes and offers the following constructor (please note that +the constructor is not part of the image protocol): + +``__init__(mode, size, color, source)`` + + ``mode`` must be one of the constants in the ``MODES`` set, + ``size`` is a sequence of two integers (width and height of the + new image); ``color`` is a sequence of integers, one for each + component of the image, used to initialize all the pixels to the + same value; ``source`` can be a sequence of integers of the + appropriate size and format that is copied as-is in the buffer of + the new image or an existing image; in Python 2.x ``source`` can + also be an instance of ``str`` and is interpreted as a sequence of + bytes. ``color`` and ``source`` are mutually exclusive and if + they are both omitted the image is initialized to transparent + black (all the bytes in the buffer have value 16 in the ``YV12`` + mode, 255 in the ``CMYK*`` modes and 0 for everything else). If + ``source`` is present and is an image, ``mode`` and/or ``size`` + can be omitted; if they are specified and are different from the + source mode and/or size, the source image is converted. + + The exact algorithms used for resizing and doing color space + conversions may differ between Python versions and + implementations, but they always give high quality results (e.g.: + a cubic spline interpolation can be used for upsampling and an + antialias filter can be used for downsampling images); any + combination of mode conversion is supported, but the algorithm + used for conversions to and from the ``CMYK*`` modes is pretty + na?ve: if you have the exact color profiles of your devices you + may want to use a good color management tool such as LittleCMS. + The new image has an empty ``info`` ``dict``. + + +Line Objects +'''''''''''' + +The line objects (returned, e.g., when iterating over an image) +support the following attributes and methods: + +``mode`` + + The mode of the image from where this line comes. + +``__iter__() -> iterator[pixel]`` + + Returns an iterator that iterates over all the pixels in the line, + from left to right. See below for a description of the `pixel + objects`_. + +``__len__() -> int`` + + Returns the number of pixels in the line (the image width). + +``__getitem__(integer) -> pixel`` + + Returns the pixel at the specified (x) position. + +``__getitem__(slice) -> image`` + + The selected part of the line is copied and a new image is + returned; the new image will always have height 1. + +``__setitem__(integer, integer | iterable[integer]) -> None`` + + Modifies the pixel at the specified position; ``line[x] = + integer`` is a shortcut for ``line[x] = (integer,)`` for images + with a single component. + +``__setitem__(slice, image) -> None`` + + Selects a part of the line and assigns to it a copy of the pixels + from the image in the second argument, that must have height 1, a + width equal to the specified slice and the same mode as this line; + the alpha component, if present, is simply copied and doesn't + affect the other components of the image (i.e. no alpha + compositing is performed). + + +Pixel Objects +''''''''''''' + +The pixel objects (returned, e.g., when iterating over a line) support +the following attributes and methods: + +``mode`` + + The mode of the image from where this pixel comes. + +``value`` + + A tuple of integers, one for each component. Any iterable of the + correct length can be assigned to ``value`` (it will be + automagically converted to a tuple), but you can't assign to it an + integer, even if the mode has only a single component: use, e.g., + ``pixel.l = 123`` instead. + +``r, g, b, a, l, c, m, y, k`` + + The integer values of each component; only those applicable for + the current mode (in ``mode.component_names``) will be available. + +| ``__iter__() -> iterator[int]`` +| ``__len__() -> int`` +| ``__getitem__(integer | slice) -> int | tuple[int]`` +| ``__setitem__(integer | slice, integer | iterable[integer]) -> + None`` + + These four methods emulate a fixed length list of integers, one + for each pixel component. + + +``ImageSize`` Class +''''''''''''''''''' + +``ImageSize`` is a named tuple, a class identical to ``tuple`` except +that: + +* its constructor only accepts two integers, width and height; they + are converted in the constructor using their ``__index__()`` + methods, so all the ``ImageSize`` objects are guaranteed to contain + only ``int`` (or possibly ``long``, in Python 2.x) instances; + +* it has a ``width`` and a ``height`` property that are equivalent to + the first and the second number in the tuple, respectively; + +* the string returned by its ``__repr__`` method is + ``'imageop.ImageSize(width=%d, height=%d)' % (width, height)``. + +``ImageSize`` is not usually instantiated by end-users, but can be +used when creating a new class that implements the image protocol, +since the ``size`` attribute must be an ``ImageSize`` instance. + + +C API +----- + +The available image modes are visible at the C level as ``PyImage_*`` +constants of type ``PyObject *`` (e.g.: ``PyImage_RGB`` is +``imageop.RGB``). + +The following functions offer a C-friendly interface to mode and image +objects (all the functions return ``NULL`` or -1 on failure): + +``int PyImageMode_Check(PyObject *obj)`` + + Returns true if the object ``obj`` is a valid image mode. + +| ``int PyImageMode_GetComponents(PyObject *mode)`` +| ``PyObject* PyImageMode_GetComponentNames(PyObject *mode)`` +| ``int PyImageMode_GetBitsPerComponent(PyObject *mode)`` +| ``int PyImageMode_GetBytesPerPixel(PyObject *mode)`` +| ``int PyImageMode_GetPlanar(PyObject *mode)`` +| ``PyObject* PyImageMode_GetSubsampling(PyObject *mode)`` +| ``int PyImageMode_GetXDivisor(PyObject *mode)`` +| ``int PyImageMode_GetYDivisor(PyObject *mode)`` +| ``Py_ssize_t PyImageMode_GetLength(PyObject *mode, Py_ssize_t width, + Py_ssize_t height)`` + + These functions are equivalent to their corresponding Python + attributes or methods. + +``int PyImage_Check(PyObject *obj)`` + + Returns true if the object ``obj`` is an ``Image`` object or an + instance of a subtype of the ``Image`` type; see also + ``PyObject_CheckImage`` below. + +``int PyImage_CheckExact(PyObject *obj)`` + + Returns true if the object ``obj`` is an ``Image`` object, but not + an instance of a subtype of the ``Image`` type. + +| ``PyObject* PyImage_New(PyObject *mode, Py_ssize_t width, + Py_ssize_t height)`` + + Returns a new ``Image`` instance, initialized to transparent black + (see ``Image.__init__`` above for the details). + +| ``PyObject* PyImage_FromImage(PyObject *image, PyObject *mode, + Py_ssize_t width, Py_ssize_t height)`` + + Returns a new ``Image`` instance, initialized with the contents of + the ``image`` object rescaled and converted to the specified + ``mode``, if necessary. + +| ``PyObject* PyImage_FromBuffer(PyObject *buffer, PyObject *mode, + Py_ssize_t width, + Py_ssize_t height)`` + + Returns a new ``Image`` instance, initialized with the contents of + the ``buffer`` object. + +``int PyObject_CheckImage(PyObject *obj)`` + + Returns true if the object ``obj`` implements a sufficient subset + of the image protocol to be accepted by the functions defined + below, even if its class is not a subclass of ``ImageMixin`` + and/or ``Image``. Currently it simply checks for the existence + and correctness of the attributes ``mode``, ``size`` and + ``buffer``. + +| ``PyObject* PyImage_GetMode(PyObject *image)`` +| ``Py_ssize_t PyImage_GetWidth(PyObject *image)`` +| ``Py_ssize_t PyImage_GetHeight(PyObject *image)`` +| ``int PyImage_Clip(PyObject *image)`` +| ``PyObject* PyImage_Split(PyObject *image)`` +| ``PyObject* PyImage_GetBuffer(PyObject *image)`` +| ``int PyImage_AsBuffer(PyObject *image, const void **buffer, + Py_ssize_t *buffer_len)`` + + These functions are equivalent to their corresponding Python + attributes or methods; the image memory can be accessed only with + the GIL and a reference to the image or its buffer held, and extra + care should be taken for modes with more than 8 bits per + component: the data is stored in native byte order and it can be + **not** aligned on 2 or 4 byte boundaries. + + +Examples +======== + +A few examples of common operations with the new ``Image`` class and +protocol:: + + # create a new black RGB image of 6x9 pixels + rgb_image = imageop.Image(imageop.RGB, (6, 9)) + + # same as above, but initialize the image to bright red + rgb_image = imageop.Image(imageop.RGB, (6, 9), color=(255, 0, 0)) + + # convert the image to YCbCr + yuv_image = imageop.Image(imageop.JPEG_YV12, source=rgb_image) + + # read the value of a pixel and split it into three ints + r, g, b = rgb_image[x, y] + + # modify the magenta component of a pixel in a CMYK image + cmyk_image[x, y].m = 13 + + # modify the Y (luma) component of a pixel in a *YV12 image and + # its corresponding subsampled Cr (red chroma) + yuv_image.y[x, y] = 42 + yuv_image.cr[x // 2, y // 2] = 54 + + # iterate over an image + for line in rgb_image: + for pixel in line: + # swap red and blue, and set green to 0 + pixel.value = pixel.b, 0, pixel.r + + # find the maximum value of the red component in the image + max_red = max(pixel.r for pixel in rgb_image.pixels()) + + # count the number of colors in the image + num_of_colors = len(set(tuple(pixel) for pixel in image.pixels())) + + # copy a block of 4x2 pixels near the upper right corner of an + # image and paste it into the lower left corner of the same image + image[:4, -2:] = image[-6:-2, 1:3] + + # create a copy of the image, except that the new image can have a + # different (usually empty) info dict + new_image = image[:] + + # create a mirrored copy of the image, with the left and right + # sides flipped + flipped_image = image[::-1, :] + + # downsample an image to half its original size using a fast, low + # quality operation and a slower, high quality one: + low_quality_image = image[::2, ::2] + new_size = image.size.width // 2, image.size.height // 2 + high_quality_image = imageop.Image(size=new_size, source=image) + + # direct buffer access + rgb_image[0, 0] = r, g, b + assert tuple(rgb_image.buffer[:3]) == (r, g, b) + + +Backwards Compatibility +======================= + +There are three areas touched by this PEP where backwards +compatibility should be considered: + +* **Python 2.6**: new classes and objects are added to the ``imageop`` + module without touching the existing module contents; new methods + and attributes will be added to ``Tkinter.PhotoImage`` and its + ``__getitem__`` and ``__setitem__`` methods will be modified to + accept integers, tuples and slices (currently they only accept + strings). All the changes provide a superset of the existing + functionality, so no major compatibility issues are expected. + +* **Python 3.0**: the legacy contents of the ``imageop`` module will + be deleted, according to PEP 3108; everything defined in this + proposal will work like in Python 2.x with the exception of the + usual 2.x/3.0 differences (e.g. support for ``long`` integers and + for interpreting ``str`` instances as sequences of bytes will be + dropped). + +* **external libraries**: the names and the semantics of the standard + image methods and attributes are carefully chosen to allow some + external libraries that manipulate images (including at least PIL, + wxPython and pygame) to implement the new protocol in their image + classes without breaking compatibility with existing code. The only + blatant conflicts between the image protocol and NumPy arrays are + the value of the ``size`` attribute and the coordinates order in the + ``image[x, y]`` expression. + + +Reference Implementation +======================== + +If this PEP is accepted, the author will provide a reference +implementation of the new classes in pure Python (that can run in +CPython, PyPy, Jython and IronPython) and a second one optimized for +speed in Python and C, suitable for inclusion in the CPython standard +library. The author will also submit the required Tkinter patches. +For all the code will be available a version for Python 2.x and a +version for Python 3.0 (it is expected that the two version will be +very similar and the Python 3.0 one will probably be generated almost +completely automatically). + + +Acknowledgments +=============== + +The implementation of this PEP, if accepted, is sponsored by Google +through the Google Summer of Code program. + + +Copyright +========= + +This document has been placed in the public domain. + + + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + coding: utf-8 + End: